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:
parent
aa97ba100a
commit
fee24eefa9
1 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue