summaryrefslogtreecommitdiff
path: root/src/Components/Gfx/Gfx.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-17 21:16:45 (GMT)
committerJF <jf@codingfield.com>2020-01-17 21:16:45 (GMT)
commitc1f3a31b513e90b29f31f23ba24e5856837ea6d4 (patch)
tree8c3ef1be5a0bd4fa904311e8f1fc24de22646d62 /src/Components/Gfx/Gfx.cpp
parent69a14a224780a3abe13bc4fcacd2d71db54716ac (diff)
Disable SPI, I²C, touch controller and display controller in sleep mode.
Re-enable them on wake up. Remove delays that were not needed in st7889 driver. Hopefully, it'll improve the battery life!
Diffstat (limited to 'src/Components/Gfx/Gfx.cpp')
-rw-r--r--src/Components/Gfx/Gfx.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Components/Gfx/Gfx.cpp b/src/Components/Gfx/Gfx.cpp
index 3621b05..50516f7 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();
+}
+