From 8db91f0bd19c1cebd14cf6b427c78701a8d68704 Mon Sep 17 00:00:00 2001 From: Shen Yiming Date: Tue, 31 Jul 2018 12:02:12 +0800 Subject: [PATCH] Clean up 12864 OLED code (#11388) --- Marlin/ultralcd_impl_DOGM.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Marlin/ultralcd_impl_DOGM.h b/Marlin/ultralcd_impl_DOGM.h index 1c2844c72..935b9929d 100644 --- a/Marlin/ultralcd_impl_DOGM.h +++ b/Marlin/ultralcd_impl_DOGM.h @@ -356,10 +356,8 @@ static void lcd_implementation_init() { 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); + #if !defined(LCD_RESET_PIN) && (ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)) + #define LCD_RESET_PIN LCD_PINS_RS #endif #if PIN_EXISTS(LCD_RESET) @@ -369,7 +367,7 @@ static void lcd_implementation_init() { _delay_ms(5); // delay to allow the display to initalize #endif - #if PIN_EXISTS(LCD_RESET) || ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) + #if PIN_EXISTS(LCD_RESET) u8g.begin(); #endif