diff options
| author | JF <jf@codingfield.com> | 2020-01-17 21:16:45 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-01-17 21:16:45 (GMT) |
| commit | c1f3a31b513e90b29f31f23ba24e5856837ea6d4 (patch) | |
| tree | 8c3ef1be5a0bd4fa904311e8f1fc24de22646d62 /src/drivers/St7789.h | |
| parent | 69a14a224780a3abe13bc4fcacd2d71db54716ac (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/St7789.h')
| -rw-r--r-- | src/drivers/St7789.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h index e6305b4..a32a96f 100644 --- a/src/drivers/St7789.h +++ b/src/drivers/St7789.h @@ -19,6 +19,9 @@ namespace Pinetime { void DisplayOn(); void DisplayOff(); + void Sleep(); + void Wakeup(); + private: SpiMaster& spi; @@ -27,6 +30,7 @@ namespace Pinetime { void HardwareReset(); void SoftwareReset(); void SleepOut(); + void SleepIn(); void ColMod(); void MemoryDataAccessControl(); void DisplayInversionOn(); @@ -41,6 +45,7 @@ namespace Pinetime { enum class Commands : uint8_t { SoftwareReset = 0x01, + SleepIn = 0x10, SleepOut = 0x11, NormalModeOn = 0x13, DisplayInversionOn = 0x21, |
