Expand serial support in DUE/AVR hals exploiting the templated MarlinSerial classes (#11988)

This commit is contained in:
Eduardo José Tagle authored and Scott Lahteine committed 2018-10-03 00:47:27 -05:00
1 parent f6f2246f59
commit d6955f25b2
14 files changed
+661 -558

No files matched your search

+19 -3
View File
@@ -79,16 +79,32 @@ typedef int8_t pin_t;
//extern uint8_t MCUSR;
#define NUM_SERIAL 1
// Serial ports
#ifdef USBCON
#if ENABLED(BLUETOOTH)
#define MYSERIAL0 bluetoothSerial
#else
#define MYSERIAL0 Serial
#endif
#define NUM_SERIAL 1
#else
#define MYSERIAL0 customizedSerial
#if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3"
#endif
#define MYSERIAL0 customizedSerial1
#ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3)
#error "SERIAL_PORT_2 must be from -1 to 3"
#elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
#endif
#define NUM_SERIAL 2
#define MYSERIAL1 customizedSerial2
#else
#define NUM_SERIAL 1
#endif
#endif
// --------------------------------------------------------------------------