diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index b11ede3dc5..f012bd9e36 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -488,13 +488,8 @@ #endif #endif -// Serial Controllers require LCD_SERIAL_PORT -#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) - #define LCD_NEEDS_SERIAL_PORT 1 -#endif - // Extensible UI serial touch screens. (See src/lcd/extui) -#if EITHER(LCD_NEEDS_SERIAL_PORT, TOUCH_UI_FTDI_EVE) +#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE) #define IS_EXTUI 1 #define EXTENSIBLE_UI #endif @@ -506,18 +501,22 @@ #if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) #define HAS_DWIN_E3V2 1 #endif -#if ENABLED(DWIN_LCD_PROUI) - #define DO_LIST_BIN_FILES 1 -#endif // E3V2 extras #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI #define SERIAL_CATCHALL 0 #define HAS_LCD_BRIGHTNESS 1 #define LCD_BRIGHTNESS_MAX 250 - #if ENABLED(DWIN_LCD_PROUI) - #define LCD_BRIGHTNESS_DEFAULT 127 - #endif +#endif + +#if ENABLED(DWIN_LCD_PROUI) + #define DO_LIST_BIN_FILES 1 + #define LCD_BRIGHTNESS_DEFAULT 127 +#endif + +// Serial Controllers require LCD_SERIAL_PORT +#if ANY(IS_DWIN_MARLINUI, HAS_DWIN_E3V2, HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) + #define LCD_IS_SERIAL_HOST 1 #endif #if HAS_WIRED_LCD diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 929a7c78cf..119d69ee3d 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -1203,17 +1203,16 @@ #endif /** - * LCD_SERIAL_PORT must be defined ahead of HAL.h + * LCD_SERIAL_PORT must be defined ahead of HAL.h and + * currently HAL.h must be included ahead of pins.h. */ -#ifndef LCD_SERIAL_PORT - #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI || HAS_DGUS_LCD - #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1) - #define LCD_SERIAL_PORT 1 - #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN) - #define LCD_SERIAL_PORT 2 // Creality Ender3S1, MKS Robin - #else - #define LCD_SERIAL_PORT 3 // Other boards - #endif +#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT) + #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1) + #define LCD_SERIAL_PORT 1 + #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO) + #define LCD_SERIAL_PORT 2 + #else + #define LCD_SERIAL_PORT 3 #endif #ifdef LCD_SERIAL_PORT #define AUTO_ASSIGNED_LCD_SERIAL 1 diff --git a/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h b/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h index cc651cc8ef..11451e95a4 100755 --- a/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h +++ b/Marlin/src/pins/ramps/pins_PANOWIN_CUTLASS.h @@ -102,13 +102,6 @@ #define SPINDLE_LASER_ENA_PIN 74 // J7 #endif -// -// Serial LCD -// -#if LCD_NEEDS_SERIAL_PORT && !defined(LCD_SERIAL_PORT) - #define LCD_SERIAL_PORT 2 // D16 H1 (TX2), D17 H0 (RX2) -#endif - // // SD Card // diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h index e54469afff..81cb1e1f79 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V521.h @@ -219,8 +219,3 @@ #endif #endif - -// DGUS LCDs -#if HAS_DGUS_LCD - #define LCD_SERIAL_PORT 3 -#endif