aboutsummaryrefslogtreecommitdiff
path: root/variants
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-11-11 13:25:20 +0100
committerCristian Maglie <c.maglie@bug.st>2013-11-11 13:41:04 +0100
commit96fa9f231ed4ba572b70059fc2fe4502c595a831 (patch)
treeaa140c6bd25ac95cce05bed0f3841cd5ec7c00e8 /variants
parent79d9da6058b832e555040cd066192c753f8e6c9e (diff)
Added SERIAL metadata into variant files.
Diffstat (limited to 'variants')
-rw-r--r--variants/yun/pins_arduino.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/variants/yun/pins_arduino.h b/variants/yun/pins_arduino.h
index 43912e7..ba0570b 100644
--- a/variants/yun/pins_arduino.h
+++ b/variants/yun/pins_arduino.h
@@ -25,3 +25,27 @@
#include "../leonardo/pins_arduino.h"
#define LED_BUILTIN 13
+
+// 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_USBVIRTUAL Serial
+#define SERIAL_PORT_HARDWARE Serial1
+#define SERIAL_PORT_LINUXBRIDGE Serial1
+
+// this is defined in the Leonardo variant
+#undef SERIAL_PORT_HARDWARE_OPEN
+