Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
Remove Attach Function.
How can i Stop Attach Function Interrupt .?
Question relating to:
2 Answers
9 years, 1 month ago.
Attach again with a null pointer as the function to call.
e.g. myTicker.attach(null,1);
9 years, 1 month ago.
Actually I don't think that works properly on Ticker (Andy's method), it does work for everything else though. But for Ticker use the detach function to stop it from being called.
Attaching zero works, it won't call your user function anymore, but the underlying hardware will keep generating the interrupt.
I might do a pull request to make it work like that, then it is more consistent :).
posted by 02 Feb 2015myTicker.stop(); and myInterrupt.fall(stop); would be more consistent with Timer T1.stop(); ???
posted by 02 Feb 2015