Interrupt question Two ISRs for a single interrupt pin. Possible?

Here is the sample interrupt declaration
attachInterrupt(digitalPinToInterrupt(3), isr_func, FALLING);
Which will run ISR isr_func when signal on digital pin 3 goes from HIGH to LOW.

But in my current project I want to react also to changes from LOW TO HIGH.

I have a CHANGE mode and that would work but ideally I would like to have a differrent ISRs for both events.
Is it possible to have
attachInterrupt(digitalPinToInterrupt(3), isr_f1, FALLING); attachInterrupt(digitalPinToInterrupt(3), isr_f2, RAISING);
in the same sketch

No, but you can use CHANGE instead

And possibly verify in the isr if the pin is high or low.

Thanks . That's what I thought

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.