|
@@ -364,23 +364,26 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
|
364
|
364
|
// Initialize or re-initialize the LCD
|
365
|
365
|
static void lcd_implementation_init() {
|
366
|
366
|
|
|
367
|
+ #if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
|
|
368
|
+ OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH);
|
|
369
|
+ #endif
|
|
370
|
+
|
367
|
371
|
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
368
|
372
|
SET_OUTPUT(LCD_PINS_DC);
|
369
|
373
|
OUT_WRITE(LCD_PINS_RS, LOW);
|
370
|
|
- delay(1000);
|
|
374
|
+ _delay_ms(500);
|
371
|
375
|
WRITE(LCD_PINS_RS, HIGH);
|
372
|
376
|
#endif
|
373
|
377
|
|
374
|
|
- #if PIN_EXISTS(LCD_BACKLIGHT) // Enable LCD backlight
|
375
|
|
- OUT_WRITE(LCD_BACKLIGHT_PIN, HIGH);
|
376
|
|
- #endif
|
377
|
|
-
|
378
|
378
|
#if PIN_EXISTS(LCD_RESET)
|
379
|
379
|
OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset
|
380
|
380
|
_delay_ms(5);
|
381
|
381
|
OUT_WRITE(LCD_RESET_PIN, HIGH);
|
382
|
382
|
_delay_ms(5); // delay to allow the display to initalize
|
383
|
|
- u8g.begin(); // re-initialize the display
|
|
383
|
+ #endif
|
|
384
|
+
|
|
385
|
+ #if PIN_EXISTS(LCD_RESET) || ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
|
|
386
|
+ u8g.begin();
|
384
|
387
|
#endif
|
385
|
388
|
|
386
|
389
|
#if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
|