From bb12ebcca616742b3459a8176b54a2139dc39c43 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot <tpruvot@users.noreply.github.com> Date: Wed, 18 Aug 2021 05:39:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20STM32=20delay,=20double=20?= =?UTF-8?q?reset=20in=20FSMC=20TFT=20init=20(#22584)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 10 ---------- Marlin/src/lcd/tft_io/tft_io.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index e9e712d5a362..dacf533224fc 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -36,16 +36,6 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD; void TFT_FSMC::Init() { uint32_t controllerAddress; - - #if PIN_EXISTS(TFT_RESET) - OUT_WRITE(TFT_RESET_PIN, HIGH); - HAL_Delay(100); - #endif - - #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); - #endif - FSMC_NORSRAM_TimingTypeDef Timing, ExtTiming; uint32_t NSBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS); diff --git a/Marlin/src/lcd/tft_io/tft_io.cpp b/Marlin/src/lcd/tft_io/tft_io.cpp index 29c7da235c0e..ded711b57768 100644 --- a/Marlin/src/lcd/tft_io/tft_io.cpp +++ b/Marlin/src/lcd/tft_io/tft_io.cpp @@ -65,13 +65,13 @@ if (lcd_id != 0xFFFFFFFF) return; #if PIN_EXISTS(TFT_RESET) OUT_WRITE(TFT_RESET_PIN, HIGH); delay(10); - OUT_WRITE(TFT_RESET_PIN, LOW); + WRITE(TFT_RESET_PIN, LOW); delay(10); - OUT_WRITE(TFT_RESET_PIN, HIGH); + WRITE(TFT_RESET_PIN, HIGH); #endif #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); + WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); #endif // io.Init(); @@ -149,7 +149,7 @@ if (lcd_id != 0xFFFFFFFF) return; #endif #if PIN_EXISTS(TFT_BACKLIGHT) && ENABLED(DELAYED_BACKLIGHT_INIT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); + WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif }