From c1f3a31b513e90b29f31f23ba24e5856837ea6d4 Mon Sep 17 00:00:00 2001 From: JF Date: Fri, 17 Jan 2020 22:16:45 +0100 Subject: Disable SPI, I²C, touch controller and display controller in sleep mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-enable them on wake up. Remove delays that were not needed in st7889 driver. Hopefully, it'll improve the battery life! --- src/Components/Gfx/Gfx.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Components/Gfx/Gfx.cpp') diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp index 3621b055..50516f7d 100644 --- a/src/Components/Gfx/Gfx.cpp +++ b/src/Components/Gfx/Gfx.cpp @@ -85,4 +85,12 @@ void Gfx::pixel_draw(uint8_t x, uint8_t y, uint16_t color) { lcd.DrawPixel(x, y, color); } +void Gfx::Sleep() { + lcd.Sleep(); +} + +void Gfx::Wakeup() { + lcd.Wakeup(); +} + -- cgit v1.2.3-70-g09d2