diff options
Diffstat (limited to 'firmware/target/arm/imx233/debug-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index 896c5bf6c3..228d2abcdb 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "power-imx233.h" | 30 | #include "power-imx233.h" |
31 | #include "clkctrl-imx233.h" | 31 | #include "clkctrl-imx233.h" |
32 | #include "powermgmt-imx233.h" | 32 | #include "powermgmt-imx233.h" |
33 | #include "rtc-imx233.h" | ||
33 | #include "string.h" | 34 | #include "string.h" |
34 | 35 | ||
35 | static struct | 36 | static struct |
@@ -313,10 +314,43 @@ bool dbg_hw_info_powermgmt(void) | |||
313 | } | 314 | } |
314 | } | 315 | } |
315 | 316 | ||
317 | bool dbg_hw_info_rtc(void) | ||
318 | { | ||
319 | lcd_setfont(FONT_SYSFIXED); | ||
320 | |||
321 | while(1) | ||
322 | { | ||
323 | int button = get_action(CONTEXT_STD, HZ / 10); | ||
324 | switch(button) | ||
325 | { | ||
326 | case ACTION_STD_NEXT: | ||
327 | case ACTION_STD_PREV: | ||
328 | case ACTION_STD_OK: | ||
329 | case ACTION_STD_MENU: | ||
330 | lcd_setfont(FONT_UI); | ||
331 | return true; | ||
332 | case ACTION_STD_CANCEL: | ||
333 | lcd_setfont(FONT_UI); | ||
334 | return false; | ||
335 | } | ||
336 | |||
337 | lcd_clear_display(); | ||
338 | struct imx233_rtc_info_t info = imx233_rtc_get_info(); | ||
339 | |||
340 | lcd_putsf(0, 0, "seconds: %lu", info.seconds); | ||
341 | for(int i = 0; i < 6; i++) | ||
342 | lcd_putsf(0, i + 1, "persistent%d: 0x%lx", i, info.persistent[i]); | ||
343 | |||
344 | lcd_update(); | ||
345 | yield(); | ||
346 | } | ||
347 | } | ||
348 | |||
316 | bool dbg_hw_info(void) | 349 | bool dbg_hw_info(void) |
317 | { | 350 | { |
318 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && | 351 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && |
319 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_target_info(); | 352 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && |
353 | dbg_hw_target_info(); | ||
320 | } | 354 | } |
321 | 355 | ||
322 | bool dbg_ports(void) | 356 | bool dbg_ports(void) |