summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2007-11-10 22:12:54 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2007-11-10 22:12:54 +0000
commitd3c0a7f1692fd0b367a915a8f3a7144aaebb44a7 (patch)
tree0c5335fd08dda6c0e33ac42ca4feb0184290af21 /apps
parenta5e4cc9e68640ed9ee82c02e7b9796c8511cfccf (diff)
downloadrockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.tar.gz
rockbox-d3c0a7f1692fd0b367a915a8f3a7144aaebb44a7.zip
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.c46
-rw-r--r--apps/plugins/rockblox.c18
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