attachInterrupt question

Hi ALL

in arduino.h it defines some constants and attachInterrupt(). How the compiler separate calls of HIGH and CHANGE? Since they are both int 1.

#define LOW 0x0
#define HIGH 0x1
#define CHANGE 1
#define FALLING 2
#define RISING 3

void attachInterrupt(uint8_t, void (*)(void), int mode);



attachInterrupt(interruptnum, callback, HIGH);
attachInterrupt(interruptnum, callback, CHANGE);

Here is the quote from arduino.cc web site.

https://www.arduino.cc/en/Reference/AttachInterrupt

"The Due board allows also:

HIGH to trigger the interrupt whenever the pin is high.

(Arduino Due, Zero only) "

And if you do two attachInterrupt calls specifying the same pin, the first one is ignored. You can't invoke two different interrupt handlers from a single interrupt input.

Regards,
Ray L.