diff options
Diffstat (limited to 'src/SystemTask/SystemTask.cpp')
-rw-r--r-- | src/SystemTask/SystemTask.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp index 1ee8e918..b515d1ab 100644 --- a/src/SystemTask/SystemTask.cpp +++ b/src/SystemTask/SystemTask.cpp @@ -145,6 +145,14 @@ void SystemTask::Work() { case Messages::OnButtonEvent: ReloadIdleTimer(); break; + case Messages::OnDisplayTaskSleeping: + spiNorFlash.Sleep(); + lcd.Sleep(); + touchPanel.Sleep(); + + spi.Sleep(); + twiMaster.Sleep(); + break; default: break; } } @@ -185,6 +193,13 @@ void SystemTask::OnButtonPushed() { void SystemTask::GoToRunning() { PushMessage(Messages::GoToRunning); + spi.Wakeup(); + twiMaster.Wakeup(); + + spiNorFlash.Wakeup(); + lcd.Wakeup(); + touchPanel.Wakeup(); + displayApp->PushMessage(Applications::DisplayApp::Messages::GoToRunning); displayApp->PushMessage(Applications::DisplayApp::Messages::UpdateBatteryLevel); } |