🔧 Fix LCD_SERIAL_PORT config

This commit is contained in:
Scott Lahteine 2023-04-24 21:40:08 -05:00
parent 650e6fc426
commit d1738e946a
4 changed files with 20 additions and 34 deletions

View file

@ -488,13 +488,8 @@
#endif #endif
#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) // 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 IS_EXTUI 1
#define EXTENSIBLE_UI #define EXTENSIBLE_UI
#endif #endif
@ -506,18 +501,22 @@
#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) #if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
#define HAS_DWIN_E3V2 1 #define HAS_DWIN_E3V2 1
#endif #endif
#if ENABLED(DWIN_LCD_PROUI)
#define DO_LIST_BIN_FILES 1
#endif
// E3V2 extras // E3V2 extras
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
#define SERIAL_CATCHALL 0 #define SERIAL_CATCHALL 0
#define HAS_LCD_BRIGHTNESS 1 #define HAS_LCD_BRIGHTNESS 1
#define LCD_BRIGHTNESS_MAX 250 #define LCD_BRIGHTNESS_MAX 250
#if ENABLED(DWIN_LCD_PROUI) #endif
#define LCD_BRIGHTNESS_DEFAULT 127
#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 #endif
#if HAS_WIRED_LCD #if HAS_WIRED_LCD

View file

@ -1203,17 +1203,16 @@
#endif #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 LCD_IS_SERIAL_HOST && !defined(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)
#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
#define LCD_SERIAL_PORT 1 #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN) #define LCD_SERIAL_PORT 2
#define LCD_SERIAL_PORT 2 // Creality Ender3S1, MKS Robin #else
#else #define LCD_SERIAL_PORT 3
#define LCD_SERIAL_PORT 3 // Other boards
#endif
#endif #endif
#ifdef LCD_SERIAL_PORT #ifdef LCD_SERIAL_PORT
#define AUTO_ASSIGNED_LCD_SERIAL 1 #define AUTO_ASSIGNED_LCD_SERIAL 1

View file

@ -102,13 +102,6 @@
#define SPINDLE_LASER_ENA_PIN 74 // J7 #define SPINDLE_LASER_ENA_PIN 74 // J7
#endif #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 // SD Card
// //

View file

@ -219,8 +219,3 @@
#endif #endif
#endif #endif
// DGUS LCDs
#if HAS_DGUS_LCD
#define LCD_SERIAL_PORT 3
#endif