Skip to content

Commit fca3a87

Browse files
committed
Added digitalPinToInterrupt also to robot variants
1 parent 35d4772 commit fca3a87

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

hardware/arduino/avr/variants/robot_control/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ static const uint8_t LED1 = 17; // D17 - RX_Led
9494
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
9595
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
9696

97+
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : -1)))))
98+
9799
#ifdef ARDUINO_MAIN
98100

99101
// On the Arduino board, digital pins are also used

hardware/arduino/avr/variants/robot_motor/pins_arduino.h

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ static const uint8_t TK4 = 12; // A11
8989
extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
9090
#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
9191

92+
#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : -1)))))
93+
9294
#ifdef ARDUINO_MAIN
9395

9496
// On the Arduino board, digital pins are also used

0 commit comments

Comments
 (0)