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!
This commit is contained in:
@@ -75,3 +75,13 @@ Cst816S::TouchInfos Cst816S::GetTouchInfo() {
|
||||
info.action = action;
|
||||
return info;
|
||||
}
|
||||
|
||||
void Cst816S::Sleep() {
|
||||
nrfx_twi_disable(&twi);
|
||||
nrf_gpio_cfg_default(6);
|
||||
nrf_gpio_cfg_default(7);
|
||||
}
|
||||
|
||||
void Cst816S::Wakeup() {
|
||||
Init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user