From 4dad8628ff7e7922783207532c91b3688bc7fa99 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 12 Mar 2018 08:50:51 -0500 Subject: [PATCH] Move MKS_12864OLED to lcd_implementation_init --- Marlin/Marlin_main.cpp | 6 ------ Marlin/ultralcd_impl_DOGM.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index c05b1099f..3021bbead 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -13863,12 +13863,6 @@ void setup() { pe_deactivate_magnet(1); #endif #endif - #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 ENABLED(USE_WATCHDOG) watchdog_init(); diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 573b6cd20..5ac3e7310 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -350,6 +350,13 @@ 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