Timer interrupt S-function for Arduino due
1 次查看(过去 30 天)
显示 更早的评论
Hi!
I am trying to implement a S-function which uses one of the built-in timers of the Arduino Due to produce an ISR which outputs a function-call to a connected block.
I have tried making both non-inlined and inlined s-functions both I can't figure out how to define the interrupt handler function.
If I put it directly in my s-function .c-file I want to use the "ssCallSystemWithTid(S,0,tid)" command although since the handler function needs to be a void-void function I can't supply the "S" and "tid" input parameters and therefore I am unable to run the command.
If I try to put the handler function in the .TLC file instead I found the "LibBlockExecuteFcnCall(block, 0)" but that doesn't seem to work either, I actually succeded in building the model but nothing happens at the Arduino...
Anyone that can point me in the right direction here? I feel kind of lost...
Don't know how to include the code in the best way so I attached it as .txt files...
Regards, Max
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!