File tree Expand file tree Collapse file tree 6 files changed +121
-0
lines changed
hardware/arduino/variants Expand file tree Collapse file tree 6 files changed +121
-0
lines changed Original file line number Diff line number Diff line change @@ -215,4 +215,22 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
215215
216216#endif
217217
218+ // These serial port names are intended to allow libraries and architecture-neutral
219+ // sketches to automatically default to the correct port name for a particular type
220+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
221+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
222+ //
223+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
224+ //
225+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
226+ //
227+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
228+ //
229+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
230+ //
231+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
232+ // pins are NOT connected to anything by default.
233+ #define SERIAL_PORT_HARDWARE Serial
234+ #define SERIAL_PORT_HARDWARE_OPEN Serial1
235+
218236#endif
Original file line number Diff line number Diff line change @@ -335,4 +335,25 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
335335};
336336
337337#endif /* ARDUINO_MAIN */
338+
339+ // These serial port names are intended to allow libraries and architecture-neutral
340+ // sketches to automatically default to the correct port name for a particular type
341+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
342+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
343+ //
344+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
345+ //
346+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
347+ //
348+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
349+ //
350+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
351+ //
352+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
353+ // pins are NOT connected to anything by default.
354+ #define SERIAL_PORT_MONITOR Serial
355+ #define SERIAL_PORT_USBVIRTUAL Serial
356+ #define SERIAL_PORT_HARDWARE Serial1
357+ #define SERIAL_PORT_HARDWARE_OPEN Serial1
358+
338359#endif /* Pins_Arduino_h */
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
Original file line number Diff line number Diff line change @@ -278,4 +278,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
278278};
279279
280280#endif /* ARDUINO_MAIN */
281+
282+ // These serial port names are intended to allow libraries and architecture-neutral
283+ // sketches to automatically default to the correct port name for a particular type
284+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
285+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
286+ //
287+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
288+ //
289+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
290+ //
291+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
292+ //
293+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
294+ //
295+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
296+ // pins are NOT connected to anything by default.
297+ #define SERIAL_PORT_MONITOR Serial
298+ #define SERIAL_PORT_USBVIRTUAL Serial
299+ #define SERIAL_PORT_HARDWARE Serial1
300+
281301#endif /* Pins_Arduino_h */
Original file line number Diff line number Diff line change @@ -273,4 +273,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
273273};
274274
275275#endif /* ARDUINO_MAIN */
276+
277+ // These serial port names are intended to allow libraries and architecture-neutral
278+ // sketches to automatically default to the correct port name for a particular type
279+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
280+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
281+ //
282+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
283+ //
284+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
285+ //
286+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
287+ //
288+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
289+ //
290+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
291+ // pins are NOT connected to anything by default.
292+ #define SERIAL_PORT_MONITOR Serial
293+ #define SERIAL_PORT_USBVIRTUAL Serial
294+ #define SERIAL_PORT_HARDWARE Serial1
295+
276296#endif /* Pins_Arduino_h */
Original file line number Diff line number Diff line change @@ -215,4 +215,22 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
215215
216216#endif
217217
218+ // These serial port names are intended to allow libraries and architecture-neutral
219+ // sketches to automatically default to the correct port name for a particular type
220+ // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
221+ // the first hardware serial port whose RX/TX pins are not dedicated to another use.
222+ //
223+ // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
224+ //
225+ // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
226+ //
227+ // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
228+ //
229+ // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
230+ //
231+ // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
232+ // pins are NOT connected to anything by default.
233+ #define SERIAL_PORT_MONITOR Serial
234+ #define SERIAL_PORT_HARDWARE Serial
235+
218236#endif
You can’t perform that action at this time.
0 commit comments