mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Add missing file
This commit is contained in:
39
ion/src/simulator/prizm/power.cpp
Normal file
39
ion/src/simulator/prizm/power.cpp
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user