From 9bcbe3fd723d23a709873a0855f27b86bc5c96f1 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Sun, 29 Jun 2003 15:09:01 +0000 Subject: Added restart option to system exception screen (press ON) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3768 a1c6a512-1295-4272-9138-f99709370657 --- firmware/system.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/firmware/system.c b/firmware/system.c index 3f75e020c1..1d5bb21ff6 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -23,6 +23,7 @@ #include "font.h" #include "led.h" #include "system.h" +#include "rolo.h" #define default_interrupt(name,number) \ extern __attribute__((weak,alias("UIE" #number))) void name (void); void UIE##number (void) @@ -323,7 +324,7 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ char str[32]; asm volatile ("sts\tpr,%0" : "=r"(n)); - + /* clear screen */ lcd_clear_display (); #ifdef HAVE_LCD_BITMAP @@ -347,6 +348,15 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ state = state?false:true; for (i = 0; i < 240000; ++i); + + /* try to restart firmware if ON is pressed */ +#ifdef HAVE_LCD_CHARCELLS + if (!(PADR & 0x20)) + rolo_load("/archos.mod"); +#else + if (!(PBDR & PBDR_BTN_ON)) + rolo_load("/ajbrec.ajz"); +#endif } } -- cgit v1.2.3