summaryrefslogtreecommitdiff
path: root/src/drivers/Cst816s.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-17 22:16:45 +0100
committerJF <jf@codingfield.com>2020-01-17 22:16:45 +0100
commitc1f3a31b513e90b29f31f23ba24e5856837ea6d4 (patch)
tree8c3ef1be5a0bd4fa904311e8f1fc24de22646d62 /src/drivers/Cst816s.h
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/drivers/Cst816s.h')
-rw-r--r--src/drivers/Cst816s.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h
index fea33f40..0adb448b 100644
--- a/src/drivers/Cst816s.h
+++ b/src/drivers/Cst816s.h
@@ -19,6 +19,8 @@ namespace Pinetime {
void Init();
void Probe();
TouchInfos GetTouchInfo();
+ void Sleep();
+ void Wakeup();
private:
static constexpr uint8_t pinIrq = 28;
static constexpr uint8_t pinReset = 10;