diff options
-rw-r--r-- | apps/debug_menu.c | 21 |
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); |