Skip to content

Commit 78abc56

Browse files
committed
Merge branch 'master' into serial-variant
2 parents 95eced6 + e7c24c6 commit 78abc56

File tree

6 files changed

+121
-0
lines changed

6 files changed

+121
-0
lines changed

hardware/arduino/avr/variants/ethernet/pins_arduino.h

+18
Original file line numberDiff line numberDiff 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

hardware/arduino/avr/variants/leonardo/pins_arduino.h

+21
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,25 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
337337
};
338338

339339
#endif /* ARDUINO_MAIN */
340+
341+
// These serial port names are intended to allow libraries and architecture-neutral
342+
// sketches to automatically default to the correct port name for a particular type
343+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
344+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
345+
//
346+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
347+
//
348+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
349+
//
350+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
351+
//
352+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
353+
//
354+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
355+
// pins are NOT connected to anything by default.
356+
#define SERIAL_PORT_MONITOR Serial
357+
#define SERIAL_PORT_USBVIRTUAL Serial
358+
#define SERIAL_PORT_HARDWARE Serial1
359+
#define SERIAL_PORT_HARDWARE_OPEN Serial1
360+
340361
#endif /* Pins_Arduino_h */

hardware/arduino/avr/variants/mega/pins_arduino.h

+24
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,28 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
362362

363363
#endif
364364

365+
// These serial port names are intended to allow libraries and architecture-neutral
366+
// sketches to automatically default to the correct port name for a particular type
367+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
368+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
369+
//
370+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
371+
//
372+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
373+
//
374+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
375+
//
376+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
377+
//
378+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
379+
// pins are NOT connected to anything by default.
380+
#define SERIAL_PORT_MONITOR Serial
381+
#define SERIAL_PORT_HARDWARE Serial
382+
#define SERIAL_PORT_HARDWARE1 Serial1
383+
#define SERIAL_PORT_HARDWARE2 Serial2
384+
#define SERIAL_PORT_HARDWARE3 Serial3
385+
#define SERIAL_PORT_HARDWARE_OPEN Serial1
386+
#define SERIAL_PORT_HARDWARE_OPEN1 Serial2
387+
#define SERIAL_PORT_HARDWARE_OPEN2 Serial3
388+
365389
#endif

hardware/arduino/avr/variants/robot_control/pins_arduino.h

+20
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
280280
};
281281

282282
#endif /* ARDUINO_MAIN */
283+
284+
// These serial port names are intended to allow libraries and architecture-neutral
285+
// sketches to automatically default to the correct port name for a particular type
286+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
287+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
288+
//
289+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
290+
//
291+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
292+
//
293+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
294+
//
295+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
296+
//
297+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
298+
// pins are NOT connected to anything by default.
299+
#define SERIAL_PORT_MONITOR Serial
300+
#define SERIAL_PORT_USBVIRTUAL Serial
301+
#define SERIAL_PORT_HARDWARE Serial1
302+
283303
#endif /* Pins_Arduino_h */

hardware/arduino/avr/variants/robot_motor/pins_arduino.h

+20
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,24 @@ const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
275275
};
276276

277277
#endif /* ARDUINO_MAIN */
278+
279+
// These serial port names are intended to allow libraries and architecture-neutral
280+
// sketches to automatically default to the correct port name for a particular type
281+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
282+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
283+
//
284+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
285+
//
286+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
287+
//
288+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
289+
//
290+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
291+
//
292+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
293+
// pins are NOT connected to anything by default.
294+
#define SERIAL_PORT_MONITOR Serial
295+
#define SERIAL_PORT_USBVIRTUAL Serial
296+
#define SERIAL_PORT_HARDWARE Serial1
297+
278298
#endif /* Pins_Arduino_h */

hardware/arduino/avr/variants/standard/pins_arduino.h

+18
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,22 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
217217

218218
#endif
219219

220+
// These serial port names are intended to allow libraries and architecture-neutral
221+
// sketches to automatically default to the correct port name for a particular type
222+
// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
223+
// the first hardware serial port whose RX/TX pins are not dedicated to another use.
224+
//
225+
// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
226+
//
227+
// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
228+
//
229+
// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
230+
//
231+
// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
232+
//
233+
// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
234+
// pins are NOT connected to anything by default.
235+
#define SERIAL_PORT_MONITOR Serial
236+
#define SERIAL_PORT_HARDWARE Serial
237+
220238
#endif

0 commit comments

Comments
 (0)