Number serial from 1 to match settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user