From f4e775962548e8fe581eb2b370fc73adaf252385 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 8 Oct 2006 21:34:26 +0000 Subject: 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 --- firmware/system.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'firmware/system.c') 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"))); void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ { #if CONFIG_LED == LED_REAL - bool state = true; + bool state = false; + int i = 0; #endif unsigned int n; char str[32]; @@ -1043,11 +1044,12 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ while (1) { #if CONFIG_LED == LED_REAL - volatile int i; - led (state); - state = !state; - - for (i = 0; i < 240000; ++i); + if (--i <= 0) + { + state = !state; + led(state); + i = 240000; + } #endif /* try to restart firmware if ON is pressed */ -- cgit v1.2.3