[ion] Don't forget to shutdown External Flash when

sleeping/stoping/standingby
This commit is contained in:
Émilie Feral
2019-06-11 14:23:44 -04:00
parent d913a89a3e
commit 27aa35bf40
4 changed files with 7 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ void Sleep(const char * input) {
Device::Power::sleepConfiguration();
Device::Board::shutdownPeripherals();
Device::WakeUp::onUSBPlugging();
Device::ExternalFlash::shutdown();
Device::Board::shutdownClocks();
Device::Power::enterLowPowerMode();
Device::Board::setStandardFrequency(Device::Board::Frequency::High);

View File

@@ -15,7 +15,9 @@ void Standby(const char * input) {
}
reply(sOK);
Device::Power::standbyConfiguration();
Device::Board::shutdown();
Device::Board::shutdownPeripherals();
Device::ExternalFlash::shutdown();
Device::Board::shutdownClocks();
Device::Power::enterLowPowerMode();
assert(false);
}

View File

@@ -17,6 +17,7 @@ void Stop(const char * input) {
Device::Power::stopConfiguration();
Device::Board::shutdownPeripherals();
Device::WakeUp::onUSBPlugging();
Device::ExternalFlash::shutdown();
Device::Board::shutdownClocks();
Device::Power::enterLowPowerMode();
Device::Board::initClocks();

View File

@@ -2,6 +2,7 @@
#include <drivers/board.h>
#include <drivers/reset.h>
#include <drivers/wakeup.h>
#include <drivers/external_flash.h>
namespace Ion {
namespace Power {
@@ -11,6 +12,7 @@ void standby() {
Device::Power::stopConfiguration();
Device::Board::shutdownPeripherals();
Device::WakeUp::onOnOffKeyDown();
Device::ExternalFlash::shutdown();
Device::Board::shutdownClocks();
Device::Power::enterLowPowerMode();
Device::Reset::core();