summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2017-11-14 05:17:02 +0100
committerWilliam Wilgus <me.theuser@yahoo.com>2018-07-26 04:00:28 +0200
commit056d4b0ec044aedd14bd657f4b6a6f8e96c127e3 (patch)
tree0f20a0d32fc0308bb557a8324556aea0b7b443ca /apps/debug_menu.c
parentff7d2bdee1e25148bc9775f9b804424c8e1a37b9 (diff)
downloadrockbox-056d4b0ec044aedd14bd657f4b6a6f8e96c127e3.tar.gz
rockbox-056d4b0ec044aedd14bd657f4b6a6f8e96c127e3.zip
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
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 4af17700c9..dad9fe96c8 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -774,24 +774,26 @@ static bool dbg_cpufreq(void)
774{ 774{
775 int line; 775 int line;
776 int button; 776 int button;
777 int x = 0;
778 bool done = false;
777 779
778#ifdef HAVE_LCD_BITMAP 780#ifdef HAVE_LCD_BITMAP
779 lcd_setfont(FONT_SYSFIXED); 781 lcd_setfont(FONT_SYSFIXED);
780#endif 782#endif
781 lcd_clear_display(); 783 lcd_clear_display();
782 784
783 while(1) 785 while(!done)
784 { 786 {
785 line = 0; 787 line = 0;
786 788
787 int temp = FREQ/1000000; 789 int temp = FREQ / 1000;
788 lcd_putsf(0, line++, "Frequency: %ld.%ld MHz", temp, (FREQ-temp*1000000)/100000); 790 lcd_putsf(x, line++, "Frequency: %ld.%ld MHz", temp / 1000, temp % 1000);
789 lcd_putsf(0, line++, "boost_counter: %d", get_cpu_boost_counter()); 791 lcd_putsf(x, line++, "boost_counter: %d", get_cpu_boost_counter());
790 792
791#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE 793#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE
792 extern int get_cpu_voltage_setting(void); 794 extern int get_cpu_voltage_setting(void);
793 temp = get_cpu_voltage_setting(); 795 temp = get_cpu_voltage_setting();
794 lcd_putsf(0, line++, "CPU voltage: %d.%03dV", temp / 1000, temp % 1000); 796 lcd_putsf(x, line++, "CPU voltage: %d.%03dV", temp / 1000, temp % 1000);
795#endif 797#endif
796 798
797 lcd_update(); 799 lcd_update();
@@ -806,17 +808,20 @@ static bool dbg_cpufreq(void)
806 case ACTION_STD_NEXT: 808 case ACTION_STD_NEXT:
807 cpu_boost(false); 809 cpu_boost(false);
808 break; 810 break;
809 811 case ACTION_STD_MENU:
812 x--;
813 break;
810 case ACTION_STD_OK: 814 case ACTION_STD_OK:
815 x = 0;
811 while (get_cpu_boost_counter() > 0) 816 while (get_cpu_boost_counter() > 0)
812 cpu_boost(false); 817 cpu_boost(false);
813 set_cpu_frequency(CPUFREQ_DEFAULT); 818 set_cpu_frequency(CPUFREQ_DEFAULT);
814 break; 819 break;
815 820
816 case ACTION_STD_CANCEL: 821 case ACTION_STD_CANCEL:
817 lcd_setfont(FONT_UI); 822 done = true;;
818 return false;
819 } 823 }
824 lcd_clear_display();
820 } 825 }
821 lcd_setfont(FONT_UI); 826 lcd_setfont(FONT_UI);
822 return false; 827 return false;