Serial Interrupt

28 Aug 2010

How does one detach a member function from a serial interrupt?

I have this:

SerialInput->attach(this, &MB1210::Interrupt, Serial::RxIrq);
I would like to do this:

SerialInput->attach(this, NULL, Serial::RxIrq);
but I get compiler error:  arguments for Serial.attach do not match any overload.

I've also tried 0.  Is it possible to detach this interrupt?

28 Aug 2010

Hi Thomas,

SerialInput->attach(NULL, Serial::RxIrq);
should work.

I'll consider putting in some sugar in the form of detach(); to make this more obvious.

Thanks,
Simon

28 Aug 2010

Thank you sir!