Add MKS LCD12864 A/B Controller Support (#18120)

This commit is contained in:
thisiskeithb 2020-06-16 00:43:09 -07:00 committed by GitHub
parent 749589b088
commit 2603a237f9
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 22 deletions

View file

@ -1995,6 +1995,12 @@
//
//#define MKS_MINI_12864
//
// MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
// https://www.aliexpress.com/item/33018110072.html
//
//#define MKS_LCD12864
//
// FYSETC variant of the MINI12864 graphic controller with SD support
// https://wiki.fysetc.com/Mini12864_Panel/

View file

@ -35,7 +35,15 @@
#define IS_CARTESIAN 1
#endif
#if ENABLED(CARTESIO_UI)
#if ENABLED(MKS_LCD12864)
#define MKS_MINI_12864
#endif
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define MINIPANEL
#elif ENABLED(CARTESIO_UI)
#define DOGLCD
#define IS_ULTIPANEL
@ -118,10 +126,6 @@
#define IS_RRD_SC
#define IS_U8GLIB_SSD1306
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define MINIPANEL
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)
#define FYSETC_MINI_12864

View file

@ -287,7 +287,7 @@
#elif ENABLED(AZSMZ_12864)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 190
#elif ENABLED(MKS_LCD12864B)
#elif ENABLED(MKS_LCD12864)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 205
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

View file

@ -2117,6 +2117,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
+ (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
+ (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
+ (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
+ (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
+ (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
+ ENABLED(RADDS_DISPLAY) \
@ -2143,7 +2144,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
+ ENABLED(CARTESIO_UI) \
+ ENABLED(LCD_FOR_MELZI) \
+ ENABLED(ULTI_CONTROLLER) \
+ ENABLED(MKS_MINI_12864) \
+ ENABLED(MKS_LCD12864) \
+ ENABLED(ENDER2_STOCKDISPLAY) \
+ ENABLED(FYSETC_MINI_12864_X_X) \
+ ENABLED(FYSETC_MINI_12864_1_2) \

View file

@ -240,7 +240,7 @@ bool MarlinUI::detected() { return true; }
// Initialize or re-initialize the LCD
void MarlinUI::init_lcd() {
#if DISABLED(MKS_LCD12864B)
#if DISABLED(MKS_LCD12864)
#if PIN_EXISTS(LCD_BACKLIGHT)
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
@ -272,7 +272,7 @@ void MarlinUI::init_lcd() {
TERN_(LCD_SCREEN_ROT_180, u8g.setRot180());
TERN_(LCD_SCREEN_ROT_270, u8g.setRot270());
#endif // !MKS_LCD12864B
#endif // !MKS_LCD12864
uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
}

View file

@ -603,7 +603,7 @@
#define KILL_PIN 41
#endif
#if ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 27
#define DOGLCD_CS 25

View file

@ -473,7 +473,7 @@
// #define KILL_PIN 41
//#endif
#if ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
#if ENABLED(MKS_MINI_12864)
// TO TEST
//#define DOGLCD_A0 27

View file

@ -222,7 +222,7 @@
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP."
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864 are currently supported on the BIGTREE_SKR_E3_DIP."
#endif
#endif // HAS_SPI_LCD

View file

@ -123,8 +123,8 @@
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA1 //TB
#define TEMP_0_PIN PA0 //TH1
#define TEMP_BED_PIN PA1 // TB
#define TEMP_0_PIN PA0 // TH1
#define FIL_RUNOUT_PIN PB10 // MT_DET
@ -157,11 +157,9 @@
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
// Required for MKS_MINI_12864 with this board
#define MKS_LCD12864B
#undef SHOW_BOOTSCREEN
#else // !MKS_MINI_12864
#else
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)

View file

@ -184,11 +184,9 @@
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
// Required for MKS_MINI_12864 with this board
#define MKS_LCD12864B
#undef SHOW_BOOTSCREEN
#else // !MKS_MINI_12864
#else
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)

View file

@ -115,8 +115,6 @@
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
// Required for MKS_MINI_12864 with this board
#define MKS_LCD12864B
#undef SHOW_BOOTSCREEN
#else // !MKS_MINI_12864