aboutsummaryrefslogtreecommitdiff
path: root/variants
diff options
context:
space:
mode:
Diffstat (limited to 'variants')
-rw-r--r--variants/ethernet/pins_arduino.h2
-rw-r--r--variants/gemma/pins_arduino.h6
-rw-r--r--variants/leonardo/pins_arduino.h3
3 files changed, 11 insertions, 0 deletions
diff --git a/variants/ethernet/pins_arduino.h b/variants/ethernet/pins_arduino.h
index f6773a0..a11ecfc 100644
--- a/variants/ethernet/pins_arduino.h
+++ b/variants/ethernet/pins_arduino.h
@@ -58,6 +58,8 @@ static const uint8_t A7 = 21;
#define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) - 8) : ((p) - 14)))
+#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
+
#ifdef ARDUINO_MAIN
// On the Arduino board, digital pins are also used
diff --git a/variants/gemma/pins_arduino.h b/variants/gemma/pins_arduino.h
index 1d367a7..b6aed39 100644
--- a/variants/gemma/pins_arduino.h
+++ b/variants/gemma/pins_arduino.h
@@ -42,6 +42,10 @@
// GND 4| |5 PB0 (D 0) pwm0
// +----+
+#define NUM_DIGITAL_PINS 3
+#define NUM_ANALOG_INPUTS 1
+#define LED_BUILTIN 1
+
static const uint8_t A0 = 6;
static const uint8_t A1 = 7;
static const uint8_t A2 = 8;
@@ -52,6 +56,8 @@ static const uint8_t A3 = 9;
#define digitalPinToPCMSK(p) ( ((p) <= 4) ? (&PCMSK) : ((uint8_t *)0) )
#define digitalPinToPCMSKbit(p) ( (p) )
+#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : NOT_AN_INTERRUPT)
+
#define analogPinToChannel(p) ( (p) < 6 ? (p) : (p) - 6 )
#define TCCR1A GTCCR
diff --git a/variants/leonardo/pins_arduino.h b/variants/leonardo/pins_arduino.h
index 1d98e5e..6027223 100644
--- a/variants/leonardo/pins_arduino.h
+++ b/variants/leonardo/pins_arduino.h
@@ -363,4 +363,7 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
#define SERIAL_PORT_HARDWARE Serial1
#define SERIAL_PORT_HARDWARE_OPEN Serial1
+// Alias SerialUSB to Serial
+#define SerialUSB SERIAL_PORT_USBVIRTUAL
+
#endif /* Pins_Arduino_h */