Any way to know if current code is running from ISR?


i have isr shares variable main code. variable "volatile" , when accessing via main code, disable interrupts.

i prefer have single setter variable rather having multiple paths set it, in case setting isr, do  want disable interrupts, can cause problems when called isr (well, problem not disabling, in re-enabling after).  can pass in flag tell setter if inside isr or not, wondering if there way tell automatically? or, in other words, there way check if interrupts disabled?

thanks,

-hh

aren't interrupts disabled if you're in isr?


Arduino Forum > Using Arduino > Programming Questions > Any way to know if current code is running from ISR?


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts