Skip to content

Commit 6338406

Browse files
added Due to boards.h
1 parent 753512b commit 6338406

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Boards.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,22 @@ writePort(port, value, bitmask): Write an 8 bit port.
200200
#define PIN_TO_SERVO(p) ((p) - 2)
201201

202202

203+
// Arduino DUE
204+
#elif defined(__SAM3X8E__)
205+
#define TOTAL_ANALOG_PINS 12
206+
#define TOTAL_PINS 66 // 54 digital + 12 analog
207+
#define VERSION_BLINK_PIN 13
208+
#define IS_PIN_DIGITAL(p) ((p) >= 2 && (p) < TOTAL_PINS)
209+
#define IS_PIN_ANALOG(p) ((p) >= 54 && (p) < TOTAL_PINS)
210+
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
211+
#define IS_PIN_SERVO(p) ((p) >= 2 && (p) - 2 < MAX_SERVOS)
212+
#define IS_PIN_I2C(p) ((p) == 20 || (p) == 21) // 70 71
213+
#define PIN_TO_DIGITAL(p) (p)
214+
#define PIN_TO_ANALOG(p) ((p) - 54)
215+
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
216+
#define PIN_TO_SERVO(p) ((p) - 2)
217+
218+
203219
// Teensy 1.0
204220
#elif defined(__AVR_AT90USB162__)
205221
#define TOTAL_ANALOG_PINS 0

0 commit comments

Comments
 (0)