Skip to content

Commit a2eb472

Browse files
Add SERIAL_PORT_* defines to pins_arduino.h.
1 parent c7bbebc commit a2eb472

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

hardware/pinoccio/avr/variants/pinoccio/pins_arduino.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,28 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
230230

231231
#endif
232232

233+
// These serial port names are intended to allow libraries and architecture-neutral
234+
// sketches to automatically default to the correct port name for a particular type
235+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
236+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
237+
//
238+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
239+
//
240+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
241+
//
242+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
243+
//
244+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
245+
//
246+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
247+
// pins are NOT connected to anything by default.
248+
#define SERIAL_PORT_MONITOR Serial
249+
#define SERIAL_PORT_HARDWARE Serial
250+
#define SERIAL_PORT_HARDWARE1 Serial1
251+
#define SERIAL_PORT_HARDWARE2 Serial2
252+
#define SERIAL_PORT_HARDWARE3 Serial3
253+
#define SERIAL_PORT_HARDWARE_OPEN Serial1
254+
#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
255+
#define SERIAL_PORT_HARDWARE_OPEN2 Serial3
256+
233257
#endif

0 commit comments

Comments
 (0)