1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Fix MKS_12864_OLED blank issue #10071 (#10094)

This commit is contained in:
Shen Yiming 2018-03-13 17:51:21 +08:00 committed by Scott Lahteine
parent e63cb5fe8f
commit 96c54c188a

View File

@ -350,23 +350,25 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
// Initialize or re-initialize the LCD
static void lcd_implementation_init() {
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
SET_OUTPUT(LCD_PINS_DC);
OUT_WRITE(LCD_PINS_RS, LOW);
delay(1000);
WRITE(LCD_PINS_RS, HIGH);
#endif
#if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH);
#endif
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
OUT_WRITE(LCD_PINS_RS, LOW);
_delay_ms(500);
OUT_WRITE(LCD_PINS_RS, HIGH);
#endif
#if PIN_EXISTS(LCD_RESET)
OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset
_delay_ms(5);
OUT_WRITE(LCD_RESET_PIN, HIGH);
_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
#if DISABLED(MINIPANEL) // setContrast not working for Mini Panel