From 07083fbc83c93580e28e5e050833428b62538fb6 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Wed, 9 Oct 2002 06:36:32 +0000 Subject: More HW info git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2540 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index bb9e7ec117..670f965eb2 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); -- cgit v1.2.3