diff options
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 @@ | |||
88 | #endif | 88 | #endif |
89 | #include "hwcompat.h" | 89 | #include "hwcompat.h" |
90 | 90 | ||
91 | #if CONFIG_CPU == DM320 | ||
92 | #include "debug-target.h" | ||
93 | #endif | ||
94 | |||
91 | /*---------------------------------------------------*/ | 95 | /*---------------------------------------------------*/ |
92 | /* SPECIAL DEBUG STUFF */ | 96 | /* SPECIAL DEBUG STUFF */ |
93 | /*---------------------------------------------------*/ | 97 | /*---------------------------------------------------*/ |
@@ -656,45 +660,9 @@ static bool dbg_hw_info(void) | |||
656 | lcd_update(); | 660 | lcd_update(); |
657 | 661 | ||
658 | while (!(action_userabort(TIMEOUT_BLOCK))); | 662 | while (!(action_userabort(TIMEOUT_BLOCK))); |
659 | #elif CONFIG_CPU == DM320 | 663 | #else |
660 | int line = 0, button; | 664 | /* Define this function in your target tree */ |
661 | int *address=0x0; | 665 | return __dbg_hw_info(); |
662 | bool done=false; | ||
663 | char buf[100]; | ||
664 | |||
665 | lcd_setmargins(0, 0); | ||
666 | lcd_setfont(FONT_SYSFIXED); | ||
667 | lcd_clear_display(); | ||
668 | lcd_puts(0, line++, "[Hardware info]"); | ||
669 | |||
670 | while(!done) | ||
671 | { | ||
672 | button = button_get(false); | ||
673 | button&=~BUTTON_REPEAT; | ||
674 | if (button == BUTTON_POWER) | ||
675 | done=true; | ||
676 | if(button==BUTTON_RC_PLAY) | ||
677 | address+=0x01; | ||
678 | else if (button==BUTTON_RC_DOWN) | ||
679 | address-=0x01; | ||
680 | else if (button==BUTTON_RC_FF) | ||
681 | address+=0x800; | ||
682 | else if (button==BUTTON_RC_REW) | ||
683 | address-=0x800; | ||
684 | { | ||
685 | snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick); | ||
686 | lcd_puts(0, line++, buf); | ||
687 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address); | ||
688 | lcd_puts(0, line++, buf); | ||
689 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1)); | ||
690 | lcd_puts(0, line++, buf); | ||
691 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2)); | ||
692 | lcd_puts(0, line++, buf); | ||
693 | line -= 4; | ||
694 | } | ||
695 | lcd_update(); | ||
696 | } | ||
697 | |||
698 | #endif /* CONFIG_CPU */ | 666 | #endif /* CONFIG_CPU */ |
699 | return false; | 667 | return false; |
700 | } | 668 | } |
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 | |||
188 | 188 | ||
189 | #define BOARD_HEIGHT 20 | 189 | #define BOARD_HEIGHT 20 |
190 | 190 | ||
191 | #if (LCD_WIDTH == 480) && (LCD_HEIGHT == 640) | 191 | #if (LCD_WIDTH == 640) && (LCD_HEIGHT == 480) |
192 | |||
193 | #define BLOCK_WIDTH 30 | ||
194 | #define BLOCK_HEIGHT 30 | ||
195 | #define BOARD_X 14 | ||
196 | #define BOARD_Y 2 | ||
197 | #define PREVIEW_X 342 | ||
198 | #define PREVIEW_Y 482 | ||
199 | #define LABEL_X 344 | ||
200 | #define SCORE_Y 58 | ||
201 | #define LEVEL_Y 142 | ||
202 | #define LINES_Y 218 | ||
203 | #define HIGH_LABEL_X 344 | ||
204 | #define HIGH_SCORE_Y 326 | ||
205 | #define HIGH_LEVEL_Y 344 | ||
206 | |||
207 | #elif (LCD_WIDTH == 480) && (LCD_HEIGHT == 640) | ||
192 | 208 | ||
193 | #define BLOCK_WIDTH 30 | 209 | #define BLOCK_WIDTH 30 |
194 | #define BLOCK_HEIGHT 30 | 210 | #define BLOCK_HEIGHT 30 |