We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 369b506 commit 37b6dc5Copy full SHA for 37b6dc5
hardware/arduino/avr/cores/arduino/Arduino.h
@@ -151,6 +151,8 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
151
#define NOT_A_PIN 0
152
#define NOT_A_PORT 0
153
154
+#define NOT_AN_INTERRUPT -1
155
+
156
#ifdef ARDUINO_MAIN
157
#define PA 1
158
#define PB 2
hardware/arduino/avr/variants/mega/pins_arduino.h
@@ -83,7 +83,7 @@ static const uint8_t A15 = 69;
83
( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
84
0 ) ) ) ) ) )
85
86
-#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : -1)))
+#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))
87
88
89
0 commit comments