Add missing file

This commit is contained in:
Heath123
2023-05-07 12:54:53 +01:00
parent e8304d231d
commit 9f8e8d024d

View File

@@ -0,0 +1,39 @@
#include <ion/power.h>
#include <stdint.h>
#include <string.h>
#include "main.h"
#include <gint/gint.h>
#include <gint/display.h>
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);
}
}
}