diff --git a/ion/src/device/bench/command/sleep.cpp b/ion/src/device/bench/command/sleep.cpp index 76f51c019..44e467a8c 100644 --- a/ion/src/device/bench/command/sleep.cpp +++ b/ion/src/device/bench/command/sleep.cpp @@ -1,5 +1,7 @@ #include "command.h" -#include +#include +#include +#include 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(); } } diff --git a/ion/src/device/bench/command/standby.cpp b/ion/src/device/bench/command/standby.cpp index 486313706..6dd975c2d 100644 --- a/ion/src/device/bench/command/standby.cpp +++ b/ion/src/device/bench/command/standby.cpp @@ -1,5 +1,7 @@ #include "command.h" -#include +#include +#include +#include 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); } } diff --git a/ion/src/device/bench/command/stop.cpp b/ion/src/device/bench/command/stop.cpp index 6a310a1e3..651e3bd7c 100644 --- a/ion/src/device/bench/command/stop.cpp +++ b/ion/src/device/bench/command/stop.cpp @@ -1,5 +1,7 @@ #include "command.h" -#include +#include +#include +#include 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(); } }