Misc patches preceding DGUS PR

This commit is contained in:
Scott Lahteine
2020-01-02 17:59:06 -06:00
parent c75b560604
commit 5b75a018b7
23 changed files with 100 additions and 103 deletions

View File

@ -78,13 +78,10 @@
#define MSerial5 Serial4
#endif
#if !WITHIN(SERIAL_PORT, -1, 5)
#error "SERIAL_PORT must be from -1 to 5"
#endif
#if SERIAL_PORT == -1
#if SERIAL_PORT == 0
#error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
#elif SERIAL_PORT == -1
#define MYSERIAL0 UsbSerial
#elif SERIAL_PORT == 0
#error "Serial port 0 does not exist"
#elif SERIAL_PORT == 1
#define MYSERIAL0 MSerial1
#elif SERIAL_PORT == 2
@ -95,19 +92,17 @@
#define MYSERIAL0 MSerial4
#elif SERIAL_PORT == 5
#define MYSERIAL0 MSerial5
#else
#error "SERIAL_PORT must be from -1 to 5. Please update your configuration."
#endif
#ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 5)
#error "SERIAL_PORT_2 must be from -1 to 5"
#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"
#endif
#define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#elif SERIAL_PORT_2 == -1
#define MYSERIAL1 UsbSerial
#elif SERIAL_PORT_2 == 0
#error "Serial port 0 does not exist"
#elif SERIAL_PORT_2 == 1
#define MYSERIAL1 MSerial1
#elif SERIAL_PORT_2 == 2
@ -118,7 +113,10 @@
#define MYSERIAL1 MSerial4
#elif SERIAL_PORT_2 == 5
#define MYSERIAL1 MSerial5
#else
#error "SERIAL_PORT_2 must be from -1 to 5. Please update your configuration."
#endif
#define NUM_SERIAL 2
#else
#define NUM_SERIAL 1
#endif