aboutsummaryrefslogtreecommitdiff
path: root/variants
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-11-11 11:39:37 +0100
committerCristian Maglie <c.maglie@bug.st>2013-11-11 11:39:37 +0100
commit2398409fbf90e84ad0bc9d17dda7b9ba7369a998 (patch)
tree6bd71a1625560c7ed2d5fc5215ea93a7488d0605 /variants
parent9d48a366169d0362cfdfcd0ecfe88afa578a5bc8 (diff)
Added SERIAL metadata into variant files.
Diffstat (limited to 'variants')
-rw-r--r--variants/ethernet/pins_arduino.h18
-rw-r--r--variants/leonardo/pins_arduino.h21
-rw-r--r--variants/mega/pins_arduino.h24
-rw-r--r--variants/robot_control/pins_arduino.h20
-rw-r--r--variants/robot_motor/pins_arduino.h20
-rw-r--r--variants/standard/pins_arduino.h18
6 files changed, 121 insertions, 0 deletions
diff --git a/variants/ethernet/pins_arduino.h b/variants/ethernet/pins_arduino.h
index 9676698..b7030d0 100644
--- a/variants/ethernet/pins_arduino.h
+++ b/variants/ethernet/pins_arduino.h
@@ -215,4 +215,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_HARDWARE Serial
+#define SERIAL_PORT_HARDWARE_OPEN Serial1
+
#endif
diff --git a/variants/leonardo/pins_arduino.h b/variants/leonardo/pins_arduino.h
index 9f3246a..473b92e 100644
--- a/variants/leonardo/pins_arduino.h
+++ b/variants/leonardo/pins_arduino.h
@@ -335,4 +335,25 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
};
#endif /* ARDUINO_MAIN */
+
+// 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_HARDWARE_OPEN Serial1
+
#endif /* Pins_Arduino_h */
diff --git a/variants/mega/pins_arduino.h b/variants/mega/pins_arduino.h
index b0b4290..9991a21 100644
--- a/variants/mega/pins_arduino.h
+++ b/variants/mega/pins_arduino.h
@@ -360,4 +360,28 @@ 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
+#define SERIAL_PORT_HARDWARE1 Serial1
+#define SERIAL_PORT_HARDWARE2 Serial2
+#define SERIAL_PORT_HARDWARE3 Serial3
+#define SERIAL_PORT_HARDWARE_OPEN Serial1
+#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
+#define SERIAL_PORT_HARDWARE_OPEN2 Serial3
+
#endif
diff --git a/variants/robot_control/pins_arduino.h b/variants/robot_control/pins_arduino.h
index 1967845..4acfc0d 100644
--- a/variants/robot_control/pins_arduino.h
+++ b/variants/robot_control/pins_arduino.h
@@ -278,4 +278,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
};
#endif /* ARDUINO_MAIN */
+
+// 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
+
#endif /* Pins_Arduino_h */
diff --git a/variants/robot_motor/pins_arduino.h b/variants/robot_motor/pins_arduino.h
index 36d2742..fdb4c67 100644
--- a/variants/robot_motor/pins_arduino.h
+++ b/variants/robot_motor/pins_arduino.h
@@ -273,4 +273,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
};
#endif /* ARDUINO_MAIN */
+
+// 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
+
#endif /* Pins_Arduino_h */
diff --git a/variants/standard/pins_arduino.h b/variants/standard/pins_arduino.h
index b024ca1..2e24e19 100644
--- a/variants/standard/pins_arduino.h
+++ b/variants/standard/pins_arduino.h
@@ -215,4 +215,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