aboutsummaryrefslogtreecommitdiff
path: root/variants/standard
diff options
context:
space:
mode:
Diffstat (limited to 'variants/standard')
-rw-r--r--variants/standard/pins_arduino.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/variants/standard/pins_arduino.h b/variants/standard/pins_arduino.h
index 30b4266..3d4a9f6 100644
--- a/variants/standard/pins_arduino.h
+++ b/variants/standard/pins_arduino.h
@@ -44,7 +44,7 @@ static const uint8_t SCK = 13;
static const uint8_t SDA = 18;
static const uint8_t SCL = 19;
-static const uint8_t LED_BUILTIN = 13;
+#define LED_BUILTIN 13
static const uint8_t A0 = 14;
static const uint8_t A1 = 15;
@@ -60,6 +60,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
@@ -215,4 +217,22 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
#endif
+// These serial port names are intended to allow libraries and architecture-neutral
+// sketches to automatically default to the correct port name for a particular type
+// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
+// the first hardware serial port whose RX/TX pins are not dedicated to another use.
+//
+// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
+//
+// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
+//
+// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
+//
+// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
+//
+// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
+// pins are NOT connected to anything by default.
+#define SERIAL_PORT_MONITOR Serial
+#define SERIAL_PORT_HARDWARE Serial
+
#endif