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:
@@ -136,9 +136,14 @@ void DisplayApp::Refresh() {
|
||||
vTaskDelay(100);
|
||||
nrf_gpio_pin_set(14);
|
||||
lcd->DisplayOff();
|
||||
lcd->Sleep();
|
||||
touchPanel.Sleep();
|
||||
state = States::Idle;
|
||||
break;
|
||||
case Messages::GoToRunning:
|
||||
lcd->Wakeup();
|
||||
touchPanel.Wakeup();
|
||||
|
||||
lcd->DisplayOn();
|
||||
nrf_gpio_pin_clear(23);
|
||||
nrf_gpio_pin_clear(22);
|
||||
|
Reference in New Issue
Block a user