Browse Source

Fix MKS_12864_OLED blank issue

Fixes #10071
pull/1/head
Scott Lahteine 7 years ago
parent
commit
65ce0303f8
  1. 15
      Marlin/src/lcd/ultralcd_impl_DOGM.h

15
Marlin/src/lcd/ultralcd_impl_DOGM.h

@ -364,23 +364,26 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
// Initialize or re-initialize the LCD // Initialize or re-initialize the LCD
static void lcd_implementation_init() { static void lcd_implementation_init() {
#if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH);
#endif
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) #if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
SET_OUTPUT(LCD_PINS_DC); SET_OUTPUT(LCD_PINS_DC);
OUT_WRITE(LCD_PINS_RS, LOW); OUT_WRITE(LCD_PINS_RS, LOW);
delay(1000); _delay_ms(500);
WRITE(LCD_PINS_RS, HIGH); WRITE(LCD_PINS_RS, HIGH);
#endif #endif
#if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH);
#endif
#if PIN_EXISTS(LCD_RESET) #if PIN_EXISTS(LCD_RESET)
OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset
_delay_ms(5); _delay_ms(5);
OUT_WRITE(LCD_RESET_PIN, HIGH); OUT_WRITE(LCD_RESET_PIN, HIGH);
_delay_ms(5); // delay to allow the display to initalize _delay_ms(5); // delay to allow the display to initalize
u8g.begin(); // re-initialize the display #endif
#if PIN_EXISTS(LCD_RESET) || ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
u8g.begin();
#endif #endif
#if DISABLED(MINIPANEL) // setContrast not working for Mini Panel #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel

Loading…
Cancel
Save