attachinterrupt w/ multiple functions ?

Hi,

Probably a silly question, but can I use attachinterrupt() to hook multiple ISRs on different line conditions? Or am I restricted to 1 ISR per interrupt ?

IE can I do this?
attachInterrupt(1,FallingClock,FALLING);
attachInterrupt(1,ClockChange,CHANGE);

If I can do multiples, I assume detachinterrupt() would remove all ISR functions (since there's apparently no way to tell it to only remove 1 of them) ?

I don't think so - the interrupt vector has only one slot per pin.

Looks like your choices for triggering the interrupt are logic low, logical change, falling edge, and rising edge. You could probably select the "logical change trigger", then code your ISR to look and see if it's high or low and execute accordingly.

-j

I think I have my code working w/ 1 ISR (need to work on the h/w some more first), so it probably was a silly question :slight_smile:
Maybe something that needs to be clarified in the documentation though?