mirror of
https://git.code.sf.net/p/newrpl/sources
synced 2024-11-16 19:51:25 +01:00
Off - Work in progress
This commit is contained in:
parent
825660b2d8
commit
cf0ae2c47f
3 changed files with 38 additions and 0 deletions
|
@ -1194,6 +1194,17 @@ void shiftedalphaKeyHandler(BINT keymsg)
|
|||
}
|
||||
|
||||
|
||||
void offKeyHandler(BINT keymsg)
|
||||
{
|
||||
// GET EVERYTHING READY FOR A WARM-RESTART
|
||||
|
||||
cpu_off();
|
||||
// DOES NOT RETURN
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define DECLARE_KEYHANDLER(name,lsymbol,csymbol) void name##KeyHandler(BINT keymsg) \
|
||||
{ \
|
||||
alphasymbolKeyHandler(keymsg,(BYTEPTR)(lsymbol),(BYTEPTR)(csymbol)); \
|
||||
|
|
|
@ -223,3 +223,25 @@ void cpu_flushTLB(void)
|
|||
asm volatile ("mcr p15, 0, %0, c8, c7, 0" : : "r" (value));
|
||||
|
||||
}
|
||||
|
||||
void cpu_off()
|
||||
{
|
||||
// TODO: CHECK FOR SERIAL TRANSMISSIONS, SD CARD WRITE OPERATIONS, ETC BEFORE GOING DOWN
|
||||
|
||||
|
||||
// MASK ALL INTERRUPTS
|
||||
__cpu_intoff();
|
||||
|
||||
// SETUP ON KEY TO WAKE UP
|
||||
|
||||
|
||||
|
||||
|
||||
// SETUP ALARM TO WAKE UP
|
||||
|
||||
// SAVE SOMETHING IN RSTATUS3 AND 4
|
||||
|
||||
// GO OFF!
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -89,3 +89,8 @@ void cpu_flushTLB(void)
|
|||
{
|
||||
// DUMMY
|
||||
}
|
||||
|
||||
void cpu_off()
|
||||
{
|
||||
// DUMMY
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue