D2: Fix the POWER button check after an exception/panic. Make this power the player off, since we don't know how to force a reboot yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22036 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2009-07-25 18:44:57 +00:00
parent aa97ba100a
commit fee24eefa9

View file

@ -22,6 +22,7 @@
#include "kernel.h"
#include "system.h"
#include "panic.h"
#include "power.h"
#define default_interrupt(name) \
extern __attribute__((weak,alias("UIRQ"))) void name (void)
@ -282,12 +283,16 @@ void system_reboot(void)
#endif
/* TODO: implement reboot (eg. jump to boot ROM?) */
while (1);
power_off();
}
void system_exception_wait(void)
{
while ((GPIOA & 0x10) == 0); /* check for power button */
#ifdef COWON_D2
while ((GPIOA & 0x4) != 0); /* check for power button */
#else
#error "system_exception_wait not implemented for this target"
#endif
}
int system_memory_guard(int newmode)