Skip to content

Commit 6c7fc81

Browse files
committed
Added pinToInterrupt() variant macro (Paul Stoffregen)
1 parent 3b2ef89 commit 6c7fc81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

variants/arduino_due_x/variant.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ extern "C"{
5656

5757
// Number of pins defined in PinDescription array
5858
#define PINS_COUNT (79u)
59+
#define NUM_DIGITAL_PINS (53u)
60+
#define NUM_ANALOG_INPUTS (12u)
61+
62+
// Interrupts
63+
#define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)
5964

6065
// LEDs
6166
#define PIN_LED_13 (13u)

0 commit comments

Comments
 (0)