From 5e867cc092605cca02229009f704594ce046bce1 Mon Sep 17 00:00:00 2001 From: mcudev <29890609+mcudev@users.noreply.github.com> Date: Fri, 10 Nov 2017 14:14:45 -0500 Subject: [PATCH] display: update display_sleep --- embed/extmod/modtrezorui/display-stm32.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/embed/extmod/modtrezorui/display-stm32.h b/embed/extmod/modtrezorui/display-stm32.h index 28a446e77..60f398c30 100644 --- a/embed/extmod/modtrezorui/display-stm32.h +++ b/embed/extmod/modtrezorui/display-stm32.h @@ -24,11 +24,12 @@ #define LED_PWM_TIM_PERIOD (10000) -static void __attribute__((unused)) display_sleep(void) { +static void __attribute__((unused)) display_sleep(void) +{ #if DISPLAY_ILI9341V || DISPLAY_ST7789V - CMD(0x28); // display off - HAL_Delay(20); - CMD(0x10); // enter sleep + CMD(0x28); // DISPOFF: Display Off + CMD(0x10); // SLPIN: Sleep in + HAL_Delay(5); // need to wait 5 milliseconds after "sleep in" before sending any new commands #endif }