1
0
Fork 0
forked from len0rd/rockbox

imx233: add ocotp debug screen

Change-Id: Ia2211f9e0b281ffb60139bba539af37d762212dc
This commit is contained in:
Amaury Pouly 2012-05-31 13:55:16 +02:00
parent 64b8d1ed7c
commit a9667636ca

View file

@ -32,6 +32,7 @@
#include "rtc-imx233.h" #include "rtc-imx233.h"
#include "dcp-imx233.h" #include "dcp-imx233.h"
#include "pinctrl-imx233.h" #include "pinctrl-imx233.h"
#include "ocotp-imx233.h"
#include "string.h" #include "string.h"
#define DEBUG_CANCEL BUTTON_BACK #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) bool dbg_hw_info(void)
{ {
return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && 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_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() &&
dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() && 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) bool dbg_ports(void)