🔧 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
// 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
#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

View file

@ -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 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)
#define LCD_SERIAL_PORT 2 // Creality Ender3S1, MKS Robin
#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 // Other boards
#endif
#define LCD_SERIAL_PORT 3
#endif
#ifdef LCD_SERIAL_PORT
#define AUTO_ASSIGNED_LCD_SERIAL 1

View file

@ -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
//

View file

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