1
0
Fork 0
forked from len0rd/rockbox

Revise r23225 a bit, removing the debug_printf function and implementing more generic lcd_(remote)_putsf function(s) instead and use those in more places

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23233 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2009-10-17 18:02:48 +00:00
parent 5ca76ab9c4
commit f34a841b0c
18 changed files with 366 additions and 413 deletions

View file

@ -295,22 +295,19 @@ void UIE (unsigned int pc) __attribute__((section(".text")));
void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
{
unsigned int n;
char str[32];
asm volatile ("sts\tpr,%0" : "=r"(n));
/* clear screen */
lcd_clear_display ();
lcd_clear_display();
#ifdef HAVE_LCD_BITMAP
lcd_setfont(FONT_SYSFIXED);
#endif
/* output exception */
n = (n - (unsigned)UIE4 + 12)>>2; /* get exception or interrupt number */
snprintf(str,sizeof(str),"I%02x:%s",n,irqname[n]);
lcd_puts(0,0,str);
snprintf(str,sizeof(str),"at %08x",pc);
lcd_puts(0,1,str);
lcd_update ();
lcd_putsf(0, 0, "I%02x:%s", n, irqname[n]);
lcd_putsf(0, 1, "at %08x", pc);
lcd_update();
/* try to restart firmware if ON is pressed */
system_exception_wait();