HAL and serial cleanup
Co-Authored-By: Jason Smith <20053467+sjasonsmith@users.noreply.github.com>
This commit is contained in:
@ -582,12 +582,10 @@
|
||||
#error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
|
||||
#endif
|
||||
|
||||
#if SERIAL_PORT > 7
|
||||
#error "Set SERIAL_PORT to the port on your board. Usually this is 0."
|
||||
#endif
|
||||
|
||||
#if defined(SERIAL_PORT_2) && NUM_SERIAL < 2
|
||||
#error "SERIAL_PORT_2 is not supported for your MOTHERBOARD. Disable it to continue."
|
||||
#ifndef SERIAL_PORT
|
||||
#error "SERIAL_PORT must be defined in Configuration.h"
|
||||
#elif defined(SERIAL_PORT_2) && SERIAL_PORT_2 == SERIAL_PORT
|
||||
#error "SERIAL_PORT_2 cannot be the same as SERIAL_PORT. Please update your configuration."
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -2280,6 +2278,36 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
||||
#error "Please enable only one LCD_SCREEN_ROT_* option: 0, 90, 180, or 270."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Serial displays require a dedicated serial port
|
||||
*/
|
||||
#if HAS_DGUS_LCD
|
||||
#ifndef DGUS_SERIAL_PORT
|
||||
#error "The DGUS LCD requires DGUS_SERIAL_PORT to be defined in Configuration.h"
|
||||
#elif DGUS_SERIAL_PORT == SERIAL_PORT
|
||||
#error "DGUS_SERIAL_PORT cannot be the same as SERIAL_PORT. Please update your configuration."
|
||||
#elif defined(SERIAL_PORT_2) && DGUS_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "DGUS_SERIAL_PORT cannot be the same as SERIAL_PORT_2. Please update your configuration."
|
||||
#endif
|
||||
#elif ENABLED(MALYAN_LCD)
|
||||
#ifndef LCD_SERIAL_PORT
|
||||
#error "MALYAN_LCD requires LCD_SERIAL_PORT to be defined in Configuration.h"
|
||||
#elif LCD_SERIAL_PORT == SERIAL_PORT
|
||||
#error "LCD_SERIAL_PORT cannot be the same as SERIAL_PORT. Please update your configuration."
|
||||
#elif defined(SERIAL_PORT_2) && LCD_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "LCD_SERIAL_PORT cannot be the same as SERIAL_PORT_2. Please update your configuration."
|
||||
#endif
|
||||
#elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
|
||||
#ifndef ANYCUBIC_LCD_SERIAL_PORT
|
||||
#error "The ANYCUBIC LCD requires ANYCUBIC_LCD_SERIAL_PORT to be defined in Configuration.h"
|
||||
#elif ANYCUBIC_LCD_SERIAL_PORT == SERIAL_PORT
|
||||
#error "ANYCUBIC_LCD_SERIAL_PORT cannot be the same as SERIAL_PORT. Please update your configuration."
|
||||
#elif defined(SERIAL_PORT_2) && ANYCUBIC_LCD_SERIAL_PORT == SERIAL_PORT_2
|
||||
#error "ANYCUBIC_LCD_SERIAL_PORT cannot be the same as SERIAL_PORT_2. Please update your configuration."
|
||||
#endif
|
||||
#define ANYCUBIC_LCD_SERIAL anycubicLcdSerial
|
||||
#endif
|
||||
|
||||
/**
|
||||
* FYSETC Mini 12864 RGB backlighting required
|
||||
*/
|
||||
|
Reference in New Issue
Block a user