mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 03:29:58 +02:00
[ion] Don't forget to shutdown External Flash when
sleeping/stoping/standingby
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user