diff --git a/ion/src/simulator/prizm/power.cpp b/ion/src/simulator/prizm/power.cpp new file mode 100644 index 000000000..ff7d70e11 --- /dev/null +++ b/ion/src/simulator/prizm/power.cpp @@ -0,0 +1,39 @@ +#include +#include +#include + +#include "main.h" + +#include +#include + +void PowerOff(int displayLogo) { + __asm__ __volatile__ ( + "mov.l 2f, r2 \n\t" + "mov.l 1f, r0 \n\t" + "jmp @r2 \n\t" + "nop \n\t" + "1: \n\t" + ".long 0x1839 \n\t" + "2: \n\t" + ".long 0x80020070 \n\t" + ); +} + +void powerOff(void) { + PowerOff(1); +} + +namespace Ion { +namespace Power { + +void suspend(bool checkIfOnOffKeyReleased) { + Simulator::Main::runPowerOffSafe(powerOff, true); +} + +void standby() { + Simulator::Main::runPowerOffSafe(powerOff, true); +} + +} +}