hello everyone,
how to write an interrupt service routine in c++
i have following class:
class nm { public: char i; };
& ISR is:
void timer_isr(void) interrupt 1 { nm.i = 10; }
if i write in this manner then i is not accessible as timer_isr is not a function of class nm
in c we dont declare interrupt function
shall i declare here? if yes then how?
pls guide me on this
thank you all take care
"in c we dont declare interrupt function"
Again, 'C' has nothing to do with it; the standard 'C' language knows nothing at all about interrupts - therefore, how you do this is entirely dependent on the specific compiler that you are using.
I know if at least one compiler where you do have to declare interrupt functions!