diff options
-rw-r--r-- | firmware/system.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/firmware/system.c b/firmware/system.c index cc039b3c7e..6e73053c60 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | #include <stdio.h> | |
20 | #include "config.h" | 20 | #include "config.h" |
21 | 21 | ||
22 | #include <lcd.h> | 22 | #include <lcd.h> |
@@ -299,27 +299,21 @@ void system_reboot (void) | |||
299 | 299 | ||
300 | void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ | 300 | void UIE (unsigned int pc) /* Unexpected Interrupt or Exception */ |
301 | { | 301 | { |
302 | unsigned int i; | 302 | bool state = true; |
303 | |||
304 | #if 0 | ||
305 | unsigned int n; | 303 | unsigned int n; |
304 | char str[32]; | ||
306 | 305 | ||
307 | lcd_stop (); | ||
308 | asm volatile ("sts\tpr,%0" : "=r"(n)); | 306 | asm volatile ("sts\tpr,%0" : "=r"(n)); |
309 | 307 | ||
310 | n = (n - (unsigned)UIE0 - 4)>>2; // get exception or interrupt number | 308 | n = (n - (unsigned)UIE0 - 4)>>2; // get exception or interrupt number |
311 | lcd_start (); | 309 | snprintf(str,sizeof(str),"** UIE%02x **",n); |
312 | lcd_goto (0,0); lcd_puts ("** UIE00 **"); | 310 | lcd_puts(0,0,str); |
313 | lcd_goto (0,1); lcd_puts ("AT 00000000"); | 311 | snprintf(str,sizeof(str),"at %08x",pc); |
314 | lcd_goto (6,0); lcd_puthex (n,2); | 312 | lcd_puts(0,1,str); |
315 | lcd_goto (3,1); lcd_puthex (pc,8); /* or pc - 4 !? */ | ||
316 | lcd_stop (); | ||
317 | #endif | ||
318 | 313 | ||
319 | while (1) | 314 | while (1) |
320 | { | 315 | { |
321 | bool state = true; | 316 | volatile int i; |
322 | |||
323 | led (state); | 317 | led (state); |
324 | state = state?false:true; | 318 | state = state?false:true; |
325 | 319 | ||