diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-07-25 18:44:57 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-07-25 18:44:57 +0000 |
commit | fee24eefa9c843bac5586fb762da2d8871df3a65 (patch) | |
tree | 969b07c08a4730de7a98aeb7d93b5b959b0cef5d /firmware/target/arm/tcc780x | |
parent | aa97ba100aa19b893ba71dff28b5b0b5b0fc42b2 (diff) |
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
Diffstat (limited to 'firmware/target/arm/tcc780x')
-rw-r--r-- | firmware/target/arm/tcc780x/system-tcc780x.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/system-tcc780x.c b/firmware/target/arm/tcc780x/system-tcc780x.c index 6362f17f71..d1927c065f 100644 --- a/firmware/target/arm/tcc780x/system-tcc780x.c +++ b/firmware/target/arm/tcc780x/system-tcc780x.c @@ -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) |