diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 21 |
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; |