Misc patches preceding DGUS PR
This commit is contained in:
@@ -44,13 +44,8 @@
|
||||
// ------------------------
|
||||
|
||||
#if SERIAL_PORT == 0
|
||||
#error "Serial port 0 does not exist"
|
||||
#endif
|
||||
|
||||
#if !WITHIN(SERIAL_PORT, -1, 6)
|
||||
#error "SERIAL_PORT must be from -1 to 6"
|
||||
#endif
|
||||
#if SERIAL_PORT == -1
|
||||
#error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
|
||||
#elif SERIAL_PORT == -1
|
||||
#define MYSERIAL0 SerialUSB
|
||||
#elif SERIAL_PORT == 1
|
||||
#define MYSERIAL0 Serial1
|
||||
@@ -64,20 +59,17 @@
|
||||
#define MYSERIAL0 Serial5
|
||||
#elif SERIAL_PORT == 6
|
||||
#define MYSERIAL0 Serial6
|
||||
#else
|
||||
#error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_2
|
||||
#if SERIAL_PORT_2 == 0
|
||||
#error "Serial port 0 does not exist"
|
||||
#endif
|
||||
|
||||
#if !WITHIN(SERIAL_PORT_2, -1, 6)
|
||||
#error "SERIAL_PORT_2 must be from -1 to 6"
|
||||
#elif SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
|
||||
#endif
|
||||
#define NUM_SERIAL 2
|
||||
#if SERIAL_PORT_2 == -1
|
||||
#if SERIAL_PORT_2 == 0
|
||||
#error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
|
||||
#elif SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
|
||||
#elif SERIAL_PORT_2 == -1
|
||||
#define MYSERIAL1 SerialUSB
|
||||
#elif SERIAL_PORT_2 == 1
|
||||
#define MYSERIAL1 Serial1
|
||||
@@ -91,6 +83,8 @@
|
||||
#define MYSERIAL1 Serial5
|
||||
#elif SERIAL_PORT_2 == 6
|
||||
#define MYSERIAL1 Serial6
|
||||
#else
|
||||
#error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
|
||||
#endif
|
||||
#else
|
||||
#define NUM_SERIAL 1
|
||||
|
Reference in New Issue
Block a user