aboutsummaryrefslogtreecommitdiff
path: root/variants/mega/pins_arduino.h
diff options
context:
space:
mode:
Diffstat (limited to 'variants/mega/pins_arduino.h')
-rw-r--r--variants/mega/pins_arduino.h70
1 files changed, 48 insertions, 22 deletions
diff --git a/variants/mega/pins_arduino.h b/variants/mega/pins_arduino.h
index 7d330fa..5115c04 100644
--- a/variants/mega/pins_arduino.h
+++ b/variants/mega/pins_arduino.h
@@ -30,31 +30,57 @@
#define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1)
#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46))
-static const uint8_t SS = 53;
-static const uint8_t MOSI = 51;
-static const uint8_t MISO = 50;
-static const uint8_t SCK = 52;
+#define PIN_SPI_SS (53)
+#define PIN_SPI_MOSI (51)
+#define PIN_SPI_MISO (50)
+#define PIN_SPI_SCK (52)
+
+static const uint8_t SS = PIN_SPI_SS;
+static const uint8_t MOSI = PIN_SPI_MOSI;
+static const uint8_t MISO = PIN_SPI_MISO;
+static const uint8_t SCK = PIN_SPI_SCK;
+
+#define PIN_WIRE_SDA (20)
+#define PIN_WIRE_SCL (21)
+
+static const uint8_t SDA = PIN_WIRE_SDA;
+static const uint8_t SCL = PIN_WIRE_SCL;
-static const uint8_t SDA = 20;
-static const uint8_t SCL = 21;
#define LED_BUILTIN 13
-static const uint8_t A0 = 54;
-static const uint8_t A1 = 55;
-static const uint8_t A2 = 56;
-static const uint8_t A3 = 57;
-static const uint8_t A4 = 58;
-static const uint8_t A5 = 59;
-static const uint8_t A6 = 60;
-static const uint8_t A7 = 61;
-static const uint8_t A8 = 62;
-static const uint8_t A9 = 63;
-static const uint8_t A10 = 64;
-static const uint8_t A11 = 65;
-static const uint8_t A12 = 66;
-static const uint8_t A13 = 67;
-static const uint8_t A14 = 68;
-static const uint8_t A15 = 69;
+#define PIN_A0 (54)
+#define PIN_A1 (55)
+#define PIN_A2 (56)
+#define PIN_A3 (57)
+#define PIN_A4 (58)
+#define PIN_A5 (59)
+#define PIN_A6 (60)
+#define PIN_A7 (61)
+#define PIN_A8 (62)
+#define PIN_A9 (63)
+#define PIN_A10 (64)
+#define PIN_A11 (65)
+#define PIN_A12 (66)
+#define PIN_A13 (67)
+#define PIN_A14 (68)
+#define PIN_A15 (69)
+
+static const uint8_t A0 = PIN_A0;
+static const uint8_t A1 = PIN_A1;
+static const uint8_t A2 = PIN_A2;
+static const uint8_t A3 = PIN_A3;
+static const uint8_t A4 = PIN_A4;
+static const uint8_t A5 = PIN_A5;
+static const uint8_t A6 = PIN_A6;
+static const uint8_t A7 = PIN_A7;
+static const uint8_t A8 = PIN_A8;
+static const uint8_t A9 = PIN_A9;
+static const uint8_t A10 = PIN_A10;
+static const uint8_t A11 = PIN_A11;
+static const uint8_t A12 = PIN_A12;
+static const uint8_t A13 = PIN_A13;
+static const uint8_t A14 = PIN_A14;
+static const uint8_t A15 = PIN_A15;
// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):