From ea34aa2d3ee1df06e8a750d0aa641cc0b54181b0 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 May 2021 04:24:42 -0500 Subject: [PATCH] Add MKS_LCD12864B --- Marlin/Configuration.h | 3 ++- Marlin/src/inc/Conditionals_LCD.h | 4 ++-- Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/inc/SanityCheck.h | 7 +++++-- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7b03cfe68b..d6a7456ccf 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -2260,7 +2260,8 @@ // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout. // https://www.aliexpress.com/item/33018110072.html // -//#define MKS_LCD12864 +//#define MKS_LCD12864A +//#define MKS_LCD12864B // // FYSETC variant of the MINI12864 graphic controller with SD support diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index a6df825ad9..d767000501 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -26,8 +26,8 @@ * Conditionals that need to be set before Configuration_adv.h or pins.h */ -// MKS_LCD12864 is a variant of MKS_MINI_12864 -#if ENABLED(MKS_LCD12864) +// MKS_LCD12864A/B is a variant of MKS_MINI_12864 +#if EITHER(MKS_LCD12864A, MKS_LCD12864B) #define MKS_MINI_12864 #endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 5fabc2ef2a..67a6ce86e1 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -270,7 +270,7 @@ #elif ENABLED(AZSMZ_12864) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 190 -#elif ENABLED(MKS_LCD12864) +#elif EITHER(MKS_LCD12864A, MKS_LCD12864B) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 205 #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 1926c14c84..6959e07f12 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -560,6 +560,8 @@ #error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc." #elif defined(CUSTOM_USER_MENUS) #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG." +#elif defined(MKS_LCD12864) + #error "MKS_LCD12864 is now MKS_LCD12864A or MKS_LCD12864B." #endif /** @@ -2282,7 +2284,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \ + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ - + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \ + + (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \ + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ @@ -2313,7 +2315,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + ENABLED(MAKRPANEL) \ + ENABLED(MALYAN_LCD) \ + ENABLED(NEXTION_TFT) \ - + ENABLED(MKS_LCD12864) \ + + ENABLED(MKS_LCD12864A) \ + + ENABLED(MKS_LCD12864B) \ + ENABLED(OLED_PANEL_TINYBOY2) \ + ENABLED(OVERLORD_OLED) \ + ENABLED(PANEL_ONE) \ diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 0426e80fd2..50a533cde2 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -222,7 +222,7 @@ #define LCD_BACKLIGHT_PIN -1 #else - #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864 are currently supported on the BIGTREE_SKR_E3_DIP." + #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP." #endif #endif // HAS_WIRED_LCD