summaryrefslogtreecommitdiff
path: root/apps
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
parent9f1c82e6cce29a748cdac00c51b33702558b6483 (diff)
downloadrockbox-07083fbc83c93580e28e5e050833428b62538fb6.tar.gz
rockbox-07083fbc83c93580e28e5e050833428b62538fb6.zip
More HW info
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2540 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-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 bb9e7ec117..670f965eb2 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -139,6 +139,9 @@ bool dbg_hw_info(void)
139 int pr_polarity; 139 int pr_polarity;
140 int bitmask = *(unsigned short*)0x20000fc; 140 int bitmask = *(unsigned short*)0x20000fc;
141 int rom_version = *(unsigned short*)0x20000fe; 141 int rom_version = *(unsigned short*)0x20000fe;
142 unsigned char sec, sec2;
143 unsigned long tick;
144 bool is_12mhz;
142 145
143 if(PADR & 0x400) 146 if(PADR & 0x400)
144 usb_polarity = 0; /* Negative */ 147 usb_polarity = 0; /* Negative */
@@ -149,6 +152,19 @@ bool dbg_hw_info(void)
149 pr_polarity = 0; /* Negative */ 152 pr_polarity = 0; /* Negative */
150 else 153 else
151 pr_polarity = 1; /* Positive */ 154 pr_polarity = 1; /* Positive */
155
156 sec = rtc_read(0x01);
157 do {
158 sec2 = rtc_read(0x01);
159 } while(sec == sec2);
160
161 tick = current_tick;
162
163 do {
164 sec = rtc_read(0x01);
165 } while(sec2 == sec);
166
167 is_12mhz = (current_tick - tick > HZ);
152 168
153 lcd_setmargins(0, 0); 169 lcd_setmargins(0, 0);
154 lcd_setfont(FONT_SYSFIXED); 170 lcd_setfont(FONT_SYSFIXED);
@@ -171,6 +187,9 @@ bool dbg_hw_info(void)
171 snprintf(buf, 32, "PR: %s", pr_polarity?"positive":"negative"); 187 snprintf(buf, 32, "PR: %s", pr_polarity?"positive":"negative");
172 lcd_puts(0, 5, buf); 188 lcd_puts(0, 5, buf);
173 189
190 snprintf(buf, 32, "Freq: %s", is_12mhz?"12MHz":"11.0592MHz");
191 lcd_puts(0, 6, buf);
192
174 lcd_update(); 193 lcd_update();
175 194
176 button = button_get(true); 195 button = button_get(true);
@@ -215,7 +234,7 @@ bool dbg_hw_info(void)
215 break; 234 break;
216 } 235 }
217 236
218 lcd_puts(0, 0, buf); 237 lcd_puts(0, 1, buf);
219 lcd_update(); 238 lcd_update();
220 239
221 button = button_get(true); 240 button = button_get(true);