Browse Source

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

vanilla_fb_2.0.x
thisiskeithb 5 years ago
committed by GitHub
parent
commit
2603a237f9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Marlin/Configuration.h
  2. 14
      Marlin/src/inc/Conditionals_LCD.h
  3. 2
      Marlin/src/inc/Conditionals_post.h
  4. 3
      Marlin/src/inc/SanityCheck.h
  5. 4
      Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
  6. 2
      Marlin/src/pins/ramps/pins_RAMPS.h
  7. 2
      Marlin/src/pins/samd/pins_RAMPS_144.h
  8. 2
      Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h
  9. 4
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3.h
  10. 4
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h
  11. 2
      Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h

6
Marlin/Configuration.h

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

14
Marlin/src/inc/Conditionals_LCD.h

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

2
Marlin/src/inc/Conditionals_post.h

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

3
Marlin/src/inc/SanityCheck.h

@ -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) \

4
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp

@ -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));
}

2
Marlin/src/pins/ramps/pins_RAMPS.h

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

2
Marlin/src/pins/samd/pins_RAMPS_144.h

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

2
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, 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

4
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3.h

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

4
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h

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

2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h

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

Loading…
Cancel
Save