diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-11-10 22:12:54 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-11-10 22:12:54 +0000 |
| commit | d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7 (patch) | |
| tree | 0c5335fd08dda6c0e33ac42ca4feb0184290af21 /apps/debug_menu.c | |
| parent | a5e4cc9e68640ed9ee82c02e7b9796c8511cfccf (diff) | |
| download | rockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.zip rockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.tar.gz rockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.tar.bz2 rockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.tar.xz | |
Change the way the UART recieves data and how buttons pressed are processed. Also move some of the debug menu into the target tree and allow rockblox to build when the screen is rotated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15560 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 918a969..576d01d 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -88,6 +88,10 @@ #endif #include "hwcompat.h" +#if CONFIG_CPU == DM320 +#include "debug-target.h" +#endif + /*---------------------------------------------------*/ /* SPECIAL DEBUG STUFF */ /*---------------------------------------------------*/ @@ -656,45 +660,9 @@ static bool dbg_hw_info(void) lcd_update(); while (!(action_userabort(TIMEOUT_BLOCK))); -#elif CONFIG_CPU == DM320 - int line = 0, button; - int *address=0x0; - bool done=false; - char buf[100]; - - lcd_setmargins(0, 0); - lcd_setfont(FONT_SYSFIXED); - lcd_clear_display(); - lcd_puts(0, line++, "[Hardware info]"); - - while(!done) - { - button = button_get(false); - button&=~BUTTON_REPEAT; - if (button == BUTTON_POWER) - done=true; - if(button==BUTTON_RC_PLAY) - address+=0x01; - else if (button==BUTTON_RC_DOWN) - address-=0x01; - else if (button==BUTTON_RC_FF) - address+=0x800; - else if (button==BUTTON_RC_REW) - address-=0x800; - { - snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1)); - lcd_puts(0, line++, buf); - snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2)); - lcd_puts(0, line++, buf); - line -= 4; - } - lcd_update(); - } - +#else + /* Define this function in your target tree */ + return __dbg_hw_info(); #endif /* CONFIG_CPU */ return false; } |