MMU2 as standard serial device (#20771)
This commit is contained in:
@ -512,7 +512,10 @@
|
||||
#endif
|
||||
|
||||
// Flag the indexed serial ports that are in use
|
||||
#define ANY_SERIAL_IS(N) (defined(SERIAL_PORT) && SERIAL_PORT == (N)) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
|
||||
#define ANY_SERIAL_IS(N) (defined(SERIAL_PORT) && SERIAL_PORT == (N)) || \
|
||||
(defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || \
|
||||
(defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \
|
||||
(defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N))
|
||||
#if ANY_SERIAL_IS(-1)
|
||||
#define USING_SERIAL_DEFAULT
|
||||
#endif
|
||||
|
@ -588,10 +588,6 @@
|
||||
#error "SERIAL_PORT must be defined."
|
||||
#elif defined(SERIAL_PORT_2) && SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 cannot be the same as SERIAL_PORT."
|
||||
#elif defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == SERIAL_PORT
|
||||
#error "LCD_SERIAL_PORT cannot be the same as SERIAL_PORT."
|
||||
#elif defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "LCD_SERIAL_PORT cannot be the same as SERIAL_PORT_2."
|
||||
#endif
|
||||
#if !(defined(__AVR__) && defined(USBCON))
|
||||
#if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
|
||||
@ -2389,11 +2385,26 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
||||
#error "SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set SERIAL_PORT to a valid value for your board."
|
||||
#elif SERIAL_PORT_2 == -1
|
||||
#error "SERIAL_PORT_2 is set to -1, but the MOTHERBOARD has no native USB support. Set SERIAL_PORT_2 to a valid value for your board."
|
||||
#elif MMU2_SERIAL_PORT == -1
|
||||
#error "MMU2_SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set MMU2_SERIAL_PORT to a valid value for your board."
|
||||
#elif LCD_SERIAL_PORT == -1
|
||||
#error "LCD_SERIAL_PORT is set to -1, but the MOTHERBOARD has no native USB support. Set LCD_SERIAL_PORT to a valid value for your board."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MMU2 require a dedicated serial port
|
||||
*/
|
||||
#ifdef MMU2_SERIAL_PORT
|
||||
#if MMU2_SERIAL_PORT == SERIAL_PORT
|
||||
#error "MMU2_SERIAL_PORT cannot be the same as SERIAL_PORT."
|
||||
#elif defined(SERIAL_PORT_2) && MMU2_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "MMU2_SERIAL_PORT cannot be the same as SERIAL_PORT_2."
|
||||
#elif defined(LCD_SERIAL_PORT) && MMU2_SERIAL_PORT == LCD_SERIAL_PORT
|
||||
#error "MMU2_SERIAL_PORT cannot be the same as LCD_SERIAL_PORT."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Serial displays require a dedicated serial port
|
||||
*/
|
||||
|
Reference in New Issue
Block a user