summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-10-09 06:36:32 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-10-09 06:36:32 +0000
commit07083fbc83c93580e28e5e050833428b62538fb6 (patch)
tree024b789b4d021e89b93b7cfb5b0f7c3196ae9d87 /apps/debug_menu.c
parent9f1c82e6cce29a748cdac00c51b33702558b6483 (diff)
downloadrockbox-07083fbc83c93580e28e5e050833428b62538fb6.zip
rockbox-07083fbc83c93580e28e5e050833428b62538fb6.tar.gz
rockbox-07083fbc83c93580e28e5e050833428b62538fb6.tar.bz2
rockbox-07083fbc83c93580e28e5e050833428b62538fb6.tar.xz
More HW info
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2540 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index bb9e7ec..670f965 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -139,6 +139,9 @@ bool dbg_hw_info(void)
int pr_polarity;
int bitmask = *(unsigned short*)0x20000fc;
int rom_version = *(unsigned short*)0x20000fe;
+ unsigned char sec, sec2;
+ unsigned long tick;
+ bool is_12mhz;
if(PADR & 0x400)
usb_polarity = 0; /* Negative */
@@ -149,6 +152,19 @@ bool dbg_hw_info(void)
pr_polarity = 0; /* Negative */
else
pr_polarity = 1; /* Positive */
+
+ sec = rtc_read(0x01);
+ do {
+ sec2 = rtc_read(0x01);
+ } while(sec == sec2);
+
+ tick = current_tick;
+
+ do {
+ sec = rtc_read(0x01);
+ } while(sec2 == sec);
+
+ is_12mhz = (current_tick - tick > HZ);
lcd_setmargins(0, 0);
lcd_setfont(FONT_SYSFIXED);
@@ -171,6 +187,9 @@ bool dbg_hw_info(void)
snprintf(buf, 32, "PR: %s", pr_polarity?"positive":"negative");
lcd_puts(0, 5, buf);
+ snprintf(buf, 32, "Freq: %s", is_12mhz?"12MHz":"11.0592MHz");
+ lcd_puts(0, 6, buf);
+
lcd_update();
button = button_get(true);
@@ -215,7 +234,7 @@ bool dbg_hw_info(void)
break;
}
- lcd_puts(0, 0, buf);
+ lcd_puts(0, 1, buf);
lcd_update();
button = button_get(true);