Skip to content

Commit adcd678

Browse files
committed
Backported digitalPinToInterrupt macro from IDE 1.5.x
1 parent 01fbfe5 commit adcd678

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hardware/arduino/variants/mega/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static const uint8_t A15 = 69;
8383
( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
8484
0 ) ) ) ) ) )
8585

86+
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT)))
87+
8688
#ifdef ARDUINO_MAIN
8789

8890
const uint16_t PROGMEM port_to_mode_PGM[] = {

0 commit comments

Comments
 (0)