summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-07-27 22:34:15 +0000
committerJens Arnold <amiconn@rockbox.org>2007-07-27 22:34:15 +0000
commit794c9684307ecab734e24d7f41e8ec5954dd0cd3 (patch)
treee7d4b960afcaf8cbcdbad0b5affa6f9cab43bde2
parent35735c66e00df7951df57e81792f9fdd4823d34e (diff)
downloadrockbox-794c9684307ecab734e24d7f41e8ec5954dd0cd3.tar.gz
rockbox-794c9684307ecab734e24d7f41e8ec5954dd0cd3.zip
Make 'View HW Info' work on PP5002 targets and move clock estimation there. * Shorter way to write the wait for userabort.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14031 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 4e3540491e..d1e1b86f9e 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -562,11 +562,8 @@ static bool dbg_hw_info(void)
lcd_update();
- while(1)
- {
- if (action_userabort(TIMEOUT_BLOCK))
- return false;
- }
+ while (!(action_userabort(TIMEOUT_BLOCK)));
+
#elif CONFIG_CPU == MCF5249 || CONFIG_CPU == MCF5250
char buf[32];
unsigned manu, id; /* flash IDs */
@@ -624,11 +621,8 @@ static bool dbg_hw_info(void)
lcd_update();
- while(1)
- {
- if (action_userabort(TIMEOUT_BLOCK))
- return false;
- }
+ while (!(action_userabort(TIMEOUT_BLOCK)));
+
#elif defined(CPU_PP502x)
int line = 0;
char buf[32];
@@ -663,11 +657,30 @@ static bool dbg_hw_info(void)
lcd_update();
- while(1)
- {
- if (action_userabort(TIMEOUT_BLOCK))
- return false;
- }
+ while (!(action_userabort(TIMEOUT_BLOCK)));
+
+#elif CONFIG_CPU == PP5002
+ int line = 0;
+ char buf[32];
+
+ lcd_setmargins(0, 0);
+ lcd_setfont(FONT_SYSFIXED);
+ lcd_clear_display();
+
+ lcd_puts(0, line++, "[Hardware info]");
+
+#ifdef IPOD_ARCH
+ snprintf(buf, sizeof(buf), "HW rev: 0x%08lx", IPOD_HW_REVISION);
+ lcd_puts(0, line++, buf);
+#endif
+
+ snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck());
+ lcd_puts(0, line++, buf);
+
+ lcd_update();
+
+ while (!(action_userabort(TIMEOUT_BLOCK)));
+
#endif /* CONFIG_CPU */
return false;
}
@@ -1275,8 +1288,6 @@ bool dbg_ports(void)
lcd_puts(0, line++, buf);
snprintf(buf, sizeof(buf), "TIMING2_CTL: %08lx", TIMING2_CTL);
lcd_puts(0, line++, buf);
- snprintf(buf, sizeof(buf), "Est. clock (kHz): %d", perfcheck());
- lcd_puts(0, line++, buf);
lcd_update();
if (button_get_w_tmo(HZ/10) == (DEBUG_CANCEL|BUTTON_REL))