diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2012-05-31 13:55:16 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2012-05-31 13:57:25 +0200 |
commit | a9667636ca56faaeda3242ef0e8486f59158c01b (patch) | |
tree | e36f41796d28c475b2d4eedd39d795879caa4026 /firmware/target | |
parent | 64b8d1ed7c68e1805c2e35dbf5be42ff10c3e2a5 (diff) | |
download | rockbox-a9667636ca56faaeda3242ef0e8486f59158c01b.tar.gz rockbox-a9667636ca56faaeda3242ef0e8486f59158c01b.zip |
imx233: add ocotp debug screen
Change-Id: Ia2211f9e0b281ffb60139bba539af37d762212dc
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index c1701397b1..90a9336f05 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "rtc-imx233.h" | 32 | #include "rtc-imx233.h" |
33 | #include "dcp-imx233.h" | 33 | #include "dcp-imx233.h" |
34 | #include "pinctrl-imx233.h" | 34 | #include "pinctrl-imx233.h" |
35 | #include "ocotp-imx233.h" | ||
35 | #include "string.h" | 36 | #include "string.h" |
36 | 37 | ||
37 | #define DEBUG_CANCEL BUTTON_BACK | 38 | #define DEBUG_CANCEL BUTTON_BACK |
@@ -537,12 +538,40 @@ bool dbg_hw_info_pinctrl(void) | |||
537 | } | 538 | } |
538 | } | 539 | } |
539 | 540 | ||
541 | bool dbg_hw_info_ocotp(void) | ||
542 | { | ||
543 | lcd_setfont(FONT_SYSFIXED); | ||
544 | |||
545 | while(1) | ||
546 | { | ||
547 | int button = get_action(CONTEXT_STD, HZ / 10); | ||
548 | switch(button) | ||
549 | { | ||
550 | case ACTION_STD_NEXT: | ||
551 | case ACTION_STD_PREV: | ||
552 | case ACTION_STD_OK: | ||
553 | case ACTION_STD_MENU: | ||
554 | lcd_setfont(FONT_UI); | ||
555 | return true; | ||
556 | case ACTION_STD_CANCEL: | ||
557 | lcd_setfont(FONT_UI); | ||
558 | return false; | ||
559 | } | ||
560 | |||
561 | lcd_clear_display(); | ||
562 | for(int i = 0; i < 4; i++) | ||
563 | lcd_putsf(0, i, "OPS%d=%08x", i, imx233_ocotp_read(&HW_OCOTP_OPSx(i))); | ||
564 | lcd_update(); | ||
565 | yield(); | ||
566 | } | ||
567 | } | ||
568 | |||
540 | bool dbg_hw_info(void) | 569 | bool dbg_hw_info(void) |
541 | { | 570 | { |
542 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && | 571 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && |
543 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && | 572 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && |
544 | dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() && | 573 | dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() && |
545 | dbg_hw_target_info(); | 574 | dbg_hw_info_ocotp() && dbg_hw_target_info(); |
546 | } | 575 | } |
547 | 576 | ||
548 | bool dbg_ports(void) | 577 | bool dbg_ports(void) |