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, 4 months ago.
Detach method?
Is there an equivalent detach method that allows you to disable a MODSERIAL interrupt and detach the ISR you attached to it in the first place?
Question relating to:
2 Answers
7 years, 10 months ago.
im also trying to find out if this is possible, for now I just attach it to a different function that does nothing. but not the best way to solve a problem like this
7 years, 10 months ago.
Hello,
If you would like just to detach your ISR then attach a 0 (or NULL), as suggested by Andy.
modserial.attach(0);
However, this will not disable the interrups (only no user ISR will be called from that moment on).
If you'd like to disable interrupts, then I think you should call the disableIrq()
member function.
Did you try attach(NULL); ?
posted by Andy A 12 Dec 2014