summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc780x
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc780x')
-rw-r--r--firmware/target/arm/tcc780x/system-tcc780x.c9
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)