mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion/bench] Stop, sleep and stanby commands
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "command.h"
|
||||
#include <ion.h>
|
||||
#include <drivers/power.h>
|
||||
#include <drivers/board.h>
|
||||
#include <drivers/wakeup.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Device {
|
||||
@@ -12,8 +14,14 @@ void Sleep(const char * input) {
|
||||
return;
|
||||
}
|
||||
reply(sOK);
|
||||
Ion::Timing::msleep(100);
|
||||
//Ion::Power::sleep(); TODO Decomment once the method exists
|
||||
Device::Power::sleepConfiguration();
|
||||
Device::Board::shutdownPeripherals();
|
||||
Device::WakeUp::onUSBPlugging();
|
||||
Device::Board::shutdownClocks();
|
||||
Device::Power::enterLowPowerMode();
|
||||
Device::Board::setStandardFrequency(Device::Board::Frequency::High);
|
||||
Device::Board::initClocks();
|
||||
Device::Board::initPeripherals();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "command.h"
|
||||
#include <ion.h>
|
||||
#include <drivers/power.h>
|
||||
#include <drivers/board.h>
|
||||
#include <drivers/wakeup.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Device {
|
||||
@@ -12,8 +14,10 @@ void Standby(const char * input) {
|
||||
return;
|
||||
}
|
||||
reply(sOK);
|
||||
Ion::Timing::msleep(100);
|
||||
//Ion::Power::standby(); TODO Decomment once the method exists
|
||||
Device::Power::standbyConfiguration();
|
||||
Device::Board::shutdown();
|
||||
Device::Power::enterLowPowerMode();
|
||||
assert(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "command.h"
|
||||
#include <ion.h>
|
||||
#include <drivers/power.h>
|
||||
#include <drivers/board.h>
|
||||
#include <drivers/wakeup.h>
|
||||
|
||||
namespace Ion {
|
||||
namespace Device {
|
||||
@@ -12,8 +14,13 @@ void Stop(const char * input) {
|
||||
return;
|
||||
}
|
||||
reply(sOK);
|
||||
Ion::Timing::msleep(100);
|
||||
Ion::Power::suspend(); //Ion::Power::stop(); TODO Decomment once the method exists
|
||||
Device::Power::stopConfiguration();
|
||||
Device::Board::shutdownPeripherals();
|
||||
Device::WakeUp::onUSBPlugging();
|
||||
Device::Board::shutdownClocks();
|
||||
Device::Power::enterLowPowerMode();
|
||||
Device::Board::initClocks();
|
||||
Device::Board::initPeripherals();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user