summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-10-08 21:34:26 +0000
committerJens Arnold <amiconn@rockbox.org>2006-10-08 21:34:26 +0000
commitf4e775962548e8fe581eb2b370fc73adaf252385 (patch)
treea129416d262577355793363a6483490f17cad66a
parent994257ec6cb0a770cb3e3d1a49f2d1686fc70594 (diff)
downloadrockbox-f4e775962548e8fe581eb2b370fc73adaf252385.tar.gz
rockbox-f4e775962548e8fe581eb2b370fc73adaf252385.zip
UIE(), panicf(): Make reboot with ON react immediately on targets with real LED (archos recorders, player).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11154 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/panic.c14
-rw-r--r--firmware/system.c14
2 files changed, 16 insertions, 12 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
index dc9876e272..736d4bbf24 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -40,7 +40,8 @@ void panicf( const char *fmt, ...)
40 40
41#ifndef SIMULATOR 41#ifndef SIMULATOR
42#if CONFIG_LED == LED_REAL 42#if CONFIG_LED == LED_REAL
43 bool state = true; 43 bool state = false;
44 int i = 0;
44#endif 45#endif
45 46
46 /* Disable interrupts */ 47 /* Disable interrupts */
@@ -90,11 +91,12 @@ void panicf( const char *fmt, ...)
90 { 91 {
91#ifndef SIMULATOR 92#ifndef SIMULATOR
92#if CONFIG_LED == LED_REAL 93#if CONFIG_LED == LED_REAL
93 volatile long i; 94 if (--i <= 0)
94 led (state); 95 {
95 state = !state; 96 state = !state;
96 97 led(state);
97 for (i = 0; i < 240000; ++i); 98 i = 240000;
99 }
98#endif 100#endif
99 101
100 /* try to restart firmware if ON is pressed */ 102 /* try to restart firmware if ON is pressed */
diff --git a/firmware/system.c b/firmware/system.c
index bb7923792d..655b08d1bf 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -1017,7 +1017,8 @@ void UIE (unsigned int pc) __attribute__((section(".text")));
1017void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ 1017void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
1018{ 1018{
1019#if CONFIG_LED == LED_REAL 1019#if CONFIG_LED == LED_REAL
1020 bool state = true; 1020 bool state = false;
1021 int i = 0;
1021#endif 1022#endif
1022 unsigned int n; 1023 unsigned int n;
1023 char str[32]; 1024 char str[32];
@@ -1043,11 +1044,12 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
1043 while (1) 1044 while (1)
1044 { 1045 {
1045#if CONFIG_LED == LED_REAL 1046#if CONFIG_LED == LED_REAL
1046 volatile int i; 1047 if (--i <= 0)
1047 led (state); 1048 {
1048 state = !state; 1049 state = !state;
1049 1050 led(state);
1050 for (i = 0; i < 240000; ++i); 1051 i = 240000;
1052 }
1051#endif 1053#endif
1052 1054
1053 /* try to restart firmware if ON is pressed */ 1055 /* try to restart firmware if ON is pressed */