summaryrefslogtreecommitdiffstats
path: root/firmware/panic.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-09 00:54:43 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-09 00:54:43 +0000
commit0b00108c3eab73420c5b03cbe603b865276e13e8 (patch)
tree4259ba1fbdb86de800249b38b124ac87342e7f59 /firmware/panic.c
parent219944f6a306ced75b3a59b47afef90885e73d22 (diff)
downloadrockbox-0b00108c3eab73420c5b03cbe603b865276e13e8.tar.gz
rockbox-0b00108c3eab73420c5b03cbe603b865276e13e8.tar.bz2
rockbox-0b00108c3eab73420c5b03cbe603b865276e13e8.zip
SH1: Changed UIE() to use the same reset method as on coldfire, using the watchdog timer. Should be more reliable this way. Disabled LED handling and added reboot-with-on for Ondio. * All: #ifdef cleanup in panicf(), added reboot-with-on for Ondio.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7799 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/panic.c')
-rw-r--r--firmware/panic.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
index 2132402254..9226146a48 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -40,7 +40,7 @@ void panicf( const char *fmt, ...)
#ifndef SIMULATOR
#if CONFIG_LED == LED_REAL
- bool state = false;
+ bool state = true;
#endif
/* Disable interrupts */
@@ -88,31 +88,32 @@ void panicf( const char *fmt, ...)
while (1)
{
-#if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR)
+#ifndef SIMULATOR
+#if CONFIG_LED == LED_REAL
volatile long i;
led (state);
- state = state?false:true;
+ state = !state;
for (i = 0; i < 240000; ++i);
#endif
-#ifndef SIMULATOR
+
+ /* try to restart firmware if ON is pressed */
#ifdef IRIVER_H100_SERIES
- /* check for the ON button (and !hold) */
- if ((GPIO1_READ & 0x22) == 0)
- system_reboot();
+ if ((GPIO1_READ & 0x22) == 0) /* check for ON button and !hold */
#elif CONFIG_CPU == SH7034
- /* try to restart firmware if ON is pressed */
#if CONFIG_KEYPAD == PLAYER_PAD
- if (!(PADR & 0x0020))
+ if (!(PADRL & 0x20))
#elif CONFIG_KEYPAD == RECORDER_PAD
#ifdef HAVE_FMADC
if (!(PCDR & 0x0008))
#else
- if (!(PBDR & 0x0100))
-#endif
+ if (!(PBDRH & 0x01))
#endif
+#elif CONFIG_KEYPAD == ONDIO_PAD
+ if (!(PCDR & 0x0008))
+#endif /* CONFIG_KEYPAD */
+#endif /* CPU */
system_reboot();
-#endif
-#endif
+#endif /* !SIMULATOR */
}
}