Fixed interrupt display and led flash

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@696 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-05-24 15:22:33 +00:00
parent 1ac4600e5b
commit 6eb771721c

View file

@ -16,7 +16,7 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
****************************************************************************/ ****************************************************************************/
#include <stdio.h>
#include "config.h" #include "config.h"
#include <lcd.h> #include <lcd.h>
@ -299,27 +299,21 @@ void system_reboot (void)
void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
{ {
unsigned int i; bool state = true;
#if 0
unsigned int n; unsigned int n;
char str[32];
lcd_stop ();
asm volatile ("sts\tpr,%0" : "=r"(n)); asm volatile ("sts\tpr,%0" : "=r"(n));
n = (n - (unsigned)UIE0 - 4)>>2; // get exception or interrupt number n = (n - (unsigned)UIE0 - 4)>>2; // get exception or interrupt number
lcd_start (); snprintf(str,sizeof(str),"** UIE%02x **",n);
lcd_goto (0,0); lcd_puts ("** UIE00 **"); lcd_puts(0,0,str);
lcd_goto (0,1); lcd_puts ("AT 00000000"); snprintf(str,sizeof(str),"at %08x",pc);
lcd_goto (6,0); lcd_puthex (n,2); lcd_puts(0,1,str);
lcd_goto (3,1); lcd_puthex (pc,8); /* or pc - 4 !? */
lcd_stop ();
#endif
while (1) while (1)
{ {
bool state = true; volatile int i;
led (state); led (state);
state = state?false:true; state = state?false:true;