File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
hardware/arduino/variants/mega Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -360,4 +360,28 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
360360
361361#endif
362362
363+ // These serial port names are intended to allow libraries and architecture-neutral
364+ // sketches to automatically default to the correct port name for a particular type
365+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
366+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
367+ //
368+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
369+ //
370+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
371+ //
372+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
373+ //
374+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
375+ //
376+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
377+ // pins are NOT connected to anything by default.
378+ #define SERIAL_PORT_MONITOR Serial
379+ #define SERIAL_PORT_HARDWARE Serial
380+ #define SERIAL_PORT_HARDWARE1 Serial1
381+ #define SERIAL_PORT_HARDWARE2 Serial2
382+ #define SERIAL_PORT_HARDWARE3 Serial3
383+ #define SERIAL_PORT_HARDWARE_OPEN Serial1
384+ #define SERIAL_PORT_HARDWARE_OPEN1 Serial2
385+ #define SERIAL_PORT_HARDWARE_OPEN2 Serial3
386+
363387#endif
You can’t perform that action at this time.
0 commit comments