forked from len0rd/rockbox
Update AS3525 v1/v2 debug menu; add scrolling and missing frequencies
On the clip zip most debug menu items get cut off and there is no way to read most of the debug menu items. This patch makes the menu button scroll the text 1 character to the right with each press and the center (select) button re-aligns the text Adds SSP frequency(v2) & register Adds SD slot frequency(v2) Change-Id: If4705d6790e25061931ca654062e22fc2e0a6f16
This commit is contained in:
parent
ff7d2bdee1
commit
056d4b0ec0
2 changed files with 201 additions and 200 deletions
|
|
@ -774,24 +774,26 @@ static bool dbg_cpufreq(void)
|
|||
{
|
||||
int line;
|
||||
int button;
|
||||
int x = 0;
|
||||
bool done = false;
|
||||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
#endif
|
||||
lcd_clear_display();
|
||||
|
||||
while(1)
|
||||
while(!done)
|
||||
{
|
||||
line = 0;
|
||||
|
||||
int temp = FREQ/1000000;
|
||||
lcd_putsf(0, line++, "Frequency: %ld.%ld MHz", temp, (FREQ-temp*1000000)/100000);
|
||||
lcd_putsf(0, line++, "boost_counter: %d", get_cpu_boost_counter());
|
||||
int temp = FREQ / 1000;
|
||||
lcd_putsf(x, line++, "Frequency: %ld.%ld MHz", temp / 1000, temp % 1000);
|
||||
lcd_putsf(x, line++, "boost_counter: %d", get_cpu_boost_counter());
|
||||
|
||||
#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE
|
||||
extern int get_cpu_voltage_setting(void);
|
||||
temp = get_cpu_voltage_setting();
|
||||
lcd_putsf(0, line++, "CPU voltage: %d.%03dV", temp / 1000, temp % 1000);
|
||||
lcd_putsf(x, line++, "CPU voltage: %d.%03dV", temp / 1000, temp % 1000);
|
||||
#endif
|
||||
|
||||
lcd_update();
|
||||
|
|
@ -806,17 +808,20 @@ static bool dbg_cpufreq(void)
|
|||
case ACTION_STD_NEXT:
|
||||
cpu_boost(false);
|
||||
break;
|
||||
|
||||
case ACTION_STD_MENU:
|
||||
x--;
|
||||
break;
|
||||
case ACTION_STD_OK:
|
||||
x = 0;
|
||||
while (get_cpu_boost_counter() > 0)
|
||||
cpu_boost(false);
|
||||
set_cpu_frequency(CPUFREQ_DEFAULT);
|
||||
break;
|
||||
|
||||
case ACTION_STD_CANCEL:
|
||||
lcd_setfont(FONT_UI);
|
||||
return false;
|
||||
done = true;;
|
||||
}
|
||||
lcd_clear_display();
|
||||
}
|
||||
lcd_setfont(FONT_UI);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue