ausserirdischesindgesund
Member
There are two different forms of declaring interrupt handlers that I found by googling various tutorials, maybe I am getting terminology and/or concepts mixde up, be kind, I am an interrupts newbie
When timers/counters are used, I only found the form
in tutorials but when reacting to interrupts from pins, tutorials always declare
I think it is weird to use the two forms combined in one program? Or am I overthinking it? Should I convert both interrupt handlers in my sketch to one form (which?) or leave it? Is
the direct equivalent? Arduino docs say this is not recommended?
What is the ISR() syntax of attaching an interrupt to a pin?
What do you do in your programs?
Thanks in advance,
Ralph
When timers/counters are used, I only found the form
Code:
ISR(TIMER1_COMPA_vect)
in tutorials but when reacting to interrupts from pins, tutorials always declare
Code:
attachInterrupt(digitalPinToInterrupt(pin), ISR, mode)
I think it is weird to use the two forms combined in one program? Or am I overthinking it? Should I convert both interrupt handlers in my sketch to one form (which?) or leave it? Is
Code:
attachInterrupt(TIMER1_COMPA_vect, my_isr, mode)
the direct equivalent? Arduino docs say this is not recommended?
What is the ISR() syntax of attaching an interrupt to a pin?
What do you do in your programs?
Thanks in advance,
Ralph