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 | |
parent | a5e4cc9e68640ed9ee82c02e7b9796c8511cfccf (diff) |
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')
-rw-r--r-- | apps/debug_menu.c | 46 | ||||
-rw-r--r-- | apps/plugins/rockblox.c | 18 |
2 files changed, 24 insertions, 40 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 918a969a95..576d01d336 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; } diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 45f3c4f14e..dc1b25e6ec 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -188,7 +188,23 @@ PLUGIN_HEADER #define BOARD_HEIGHT 20 -#if (LCD_WIDTH == 480) && (LCD_HEIGHT == 640) +#if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) + +#define BLOCK_WIDTH 30 +#define BLOCK_HEIGHT 30 +#define BOARD_X 14 +#define BOARD_Y 2 +#define PREVIEW_X 342 +#define PREVIEW_Y 482 +#define LABEL_X 344 +#define SCORE_Y 58 +#define LEVEL_Y 142 +#define LINES_Y 218 +#define HIGH_LABEL_X 344 +#define HIGH_SCORE_Y 326 +#define HIGH_LEVEL_Y 344 + +#elif (LCD_WIDTH == 480) && (LCD_HEIGHT == 640) #define BLOCK_WIDTH 30 #define BLOCK_HEIGHT 30 |