summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-23 15:14:02 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-23 15:14:02 +0000
commitd9e13762e6437654522a2e03ad2f0e2a14764065 (patch)
tree4432790441aaebe850d09dc144e4b6d39fa3d1d9 /apps/debug_menu.c
parent80b285cdb32d744a1c92aa3dc4c0ddcb276b1362 (diff)
Better MAS debug for Players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1421 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 19a62251b9..1c1a8170d7 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -341,38 +341,53 @@ void dbg_rtc(void)
}
#endif
+#ifdef HAVE_LCD_CHARCELLS
+#define NUMROWS 1
+#else
+#define NUMROWS 4
+#endif
/* Read MAS registers and display them */
void dbg_mas(void)
{
char buf[32];
unsigned int addr = 0, r, i;
- int button;
lcd_clear_display();
lcd_puts(0, 0, "MAS register read:");
while(1)
{
- for (r = 0; r < 4; r++) {
+ for (r = 0; r < NUMROWS; r++) {
i = mas_readreg(addr + r);
- snprintf(buf, 30, "0x%02x: %08x", addr + r, i);
- lcd_puts(1, r+1, buf);
+ snprintf(buf, 30, "%02x %08x", addr + r, i);
+ lcd_puts(0, r+1, buf);
}
-
+
lcd_update();
sleep(HZ/16);
- button = button_get(false);
-
- switch(button)
+ switch(button_get(false))
{
+#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_DOWN:
- addr += 4;
+#else
+ case BUTTON_RIGHT:
+#endif
+ addr += NUMROWS;
break;
+#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_UP:
- if (addr) { addr -= 4; }
+#else
+ case BUTTON_LEFT:
+#endif
+ if(addr)
+ addr -= NUMROWS;
break;
+#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_LEFT:
+#else
+ case BUTTON_DOWN:
+#endif
return;
}
}
@@ -383,7 +398,6 @@ void dbg_mas_codec(void)
{
char buf[32];
unsigned int addr = 0, r, i;
- int button;
lcd_clear_display();
lcd_puts(0, 0, "MAS codec reg read:");
@@ -399,9 +413,7 @@ void dbg_mas_codec(void)
lcd_update();
sleep(HZ/16);
- button = button_get(false);
-
- switch(button)
+ switch(button_get(false))
{
case BUTTON_DOWN:
addr += 4;