Set DRMODE_SOLID, uniform colors, and sysfont before clearing LCD to display panic or exception messages - see FS#10665.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23623 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d1963e14de
commit
81f72ddef6
5 changed files with 37 additions and 7 deletions
|
@ -63,6 +63,7 @@ void panicf( const char *fmt, ...)
|
|||
|
||||
#if LCD_DEPTH > 1
|
||||
lcd_set_backdrop(NULL);
|
||||
lcd_set_drawmode(DRMODE_SOLID);
|
||||
lcd_set_foreground(LCD_BLACK);
|
||||
lcd_set_background(LCD_WHITE);
|
||||
#endif
|
||||
|
|
|
@ -36,10 +36,16 @@ static const char* const uiename[] = {
|
|||
*/
|
||||
void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num)
|
||||
{
|
||||
lcd_clear_display();
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
#if LCD_DEPTH > 1
|
||||
lcd_set_backdrop(NULL);
|
||||
lcd_set_drawmode(DRMODE_SOLID);
|
||||
lcd_set_foreground(LCD_BLACK);
|
||||
lcd_set_background(LCD_WHITE);
|
||||
#endif
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
lcd_set_viewport(NULL);
|
||||
#endif
|
||||
lcd_clear_display();
|
||||
lcd_puts(0, 0, uiename[num]);
|
||||
lcd_putsf(0, 1, "at %08x" IF_COP(" (%d)"), pc
|
||||
IF_COP(, CURRENT_CORE));
|
||||
|
|
|
@ -167,8 +167,15 @@ static void system_display_exception_info(unsigned long format,
|
|||
int vector = (format >> 18) & 0xff;
|
||||
|
||||
/* clear screen */
|
||||
lcd_clear_display ();
|
||||
#if LCD_DEPTH > 1
|
||||
lcd_set_backdrop(NULL);
|
||||
lcd_set_drawmode(DRMODE_SOLID);
|
||||
lcd_set_foreground(LCD_BLACK);
|
||||
lcd_set_background(LCD_WHITE);
|
||||
#endif
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
lcd_set_viewport(NULL);
|
||||
lcd_clear_display();
|
||||
|
||||
lcd_putsf(0, 0, "I%02x:%s", vector, irqname[vector]);
|
||||
lcd_putsf(0, 1, "at %08x", pc);
|
||||
|
|
|
@ -262,9 +262,17 @@ void exception_handler(void* stack_ptr, unsigned int cause, unsigned int epc)
|
|||
"$1", "LO", "HI", "STATUS", "EPC" };
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
#if LCD_DEPTH > 1
|
||||
lcd_set_backdrop(NULL);
|
||||
lcd_clear_display();
|
||||
lcd_set_drawmode(DRMODE_SOLID);
|
||||
lcd_set_foreground(LCD_BLACK);
|
||||
lcd_set_background(LCD_WHITE);
|
||||
#endif
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
lcd_set_viewport(NULL);
|
||||
#endif
|
||||
lcd_clear_display();
|
||||
_backlight_on();
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "0x%08x at 0x%08x", read_c0_badvaddr(), epc);
|
||||
|
|
|
@ -299,10 +299,18 @@ void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */
|
|||
asm volatile ("sts\tpr,%0" : "=r"(n));
|
||||
|
||||
/* clear screen */
|
||||
lcd_clear_display();
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
#if LCD_DEPTH > 1
|
||||
lcd_set_backdrop(NULL);
|
||||
lcd_set_drawmode(DRMODE_SOLID);
|
||||
lcd_set_foreground(LCD_BLACK);
|
||||
lcd_set_background(LCD_WHITE);
|
||||
#endif
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
lcd_set_viewport(NULL);
|
||||
#endif
|
||||
|
||||
lcd_clear_display();
|
||||
/* output exception */
|
||||
n = (n - (unsigned)UIE4 + 12)>>2; /* get exception or interrupt number */
|
||||
lcd_putsf(0, 0, "I%02x:%s", n, irqname[n]);
|
||||
|
|
Loading…
Reference in a new issue