diff options
-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 @@ #include "rtc-imx233.h" #include "dcp-imx233.h" #include "pinctrl-imx233.h" +#include "ocotp-imx233.h" #include "string.h" #define DEBUG_CANCEL BUTTON_BACK @@ -537,12 +538,40 @@ bool dbg_hw_info_pinctrl(void) } } +bool dbg_hw_info_ocotp(void) +{ + lcd_setfont(FONT_SYSFIXED); + + while(1) + { + int button = get_action(CONTEXT_STD, HZ / 10); + switch(button) + { + case ACTION_STD_NEXT: + case ACTION_STD_PREV: + case ACTION_STD_OK: + case ACTION_STD_MENU: + lcd_setfont(FONT_UI); + return true; + case ACTION_STD_CANCEL: + lcd_setfont(FONT_UI); + return false; + } + + lcd_clear_display(); + for(int i = 0; i < 4; i++) + lcd_putsf(0, i, "OPS%d=%08x", i, imx233_ocotp_read(&HW_OCOTP_OPSx(i))); + lcd_update(); + yield(); + } +} + bool dbg_hw_info(void) { return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() && - dbg_hw_target_info(); + dbg_hw_info_ocotp() && dbg_hw_target_info(); } bool dbg_ports(void) |