From 127c3febc130c4f35ed7e66601a7a59a78fa97a9 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Thu, 19 Jan 2006 15:03:34 +0000 Subject: UIE handler for ARM/iPod. Currently does not support interrupts. Will probably also work for other ARM based targets, like iFP. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8388 a1c6a512-1295-4272-9138-f99709370657 --- firmware/system.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'firmware/system.c') diff --git a/firmware/system.c b/firmware/system.c index da15ee1122..81e6957c2b 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -1119,6 +1119,34 @@ void irq(void) } #endif +static const char* const uiename[] = { + "Undefined instruction", "Prefetch abort", "Data abort" +}; + +/* Unexpected Interrupt or Exception handler. Currently only deals with + exceptions, but will deal with interrupts later. + */ +void UIE(unsigned int pc, unsigned int num) +{ + char str[32]; + + lcd_clear_display(); +#ifdef HAVE_LCD_BITMAP + lcd_setfont(FONT_SYSFIXED); +#endif + lcd_puts(0, 0, uiename[num]); + snprintf(str, sizeof(str), "at %08x", pc); + lcd_puts(0, 1, str); + lcd_update(); + + while (1) + { + /* TODO: perhaps add button handling in here when we get a polling + driver some day. + */ + } +} + /* TODO: The following two function have been lifted straight from IPL, and hence have a lot of numeric addresses used straight. I'd like to use #defines for these, but don't know what most of them are for or even what -- cgit v1.2.3