Number serial from 1 to match settings

This commit is contained in:
Scott Lahteine
2021-03-10 12:05:05 -06:00
parent 2c62886c71
commit dbd28eecc9
51 changed files with 155 additions and 160 deletions

View File

@@ -61,11 +61,11 @@
#endif
#ifdef SERIAL_USB
typedef ForwardSerial0Type< USBSerial > DefaultSerial;
extern DefaultSerial MSerial;
typedef ForwardSerial1Class< USBSerial > DefaultSerial1;
extern DefaultSerial1 MSerial0;
#if !HAS_SD_HOST_DRIVE
#define UsbSerial MSerial
#define UsbSerial MSerial0
#else
#define UsbSerial MarlinCompositeSerial
#endif
@@ -81,9 +81,9 @@
#endif
#if SERIAL_PORT == -1
#define MYSERIAL0 UsbSerial
#define MYSERIAL1 UsbSerial
#elif WITHIN(SERIAL_PORT, 1, NUM_UARTS)
#define MYSERIAL0 MSERIAL(SERIAL_PORT)
#define MYSERIAL1 MSERIAL(SERIAL_PORT)
#elif NUM_UARTS == 5
#error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration."
#else
@@ -92,9 +92,9 @@
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 UsbSerial
#define MYSERIAL2 UsbSerial
#elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS)
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
#define MYSERIAL2 MSERIAL(SERIAL_PORT_2)
#elif NUM_UARTS == 5
#error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration."
#else