From 213d34ed1d23dbc69570863f1587b96bc346a9f1 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 7 Mar 2005 10:51:43 +0000 Subject: Dedicated CPU frequency debug screen for CPU's with PLL git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6161 a1c6a512-1295-4272-9138-f99709370657 --- firmware/system.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'firmware') diff --git a/firmware/system.c b/firmware/system.c index 1cafc8f096..03414924ca 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -29,13 +29,13 @@ long cpu_frequency = CPU_FREQ; #endif #ifdef HAVE_ADJUSTABLE_CPU_FREQ +int boost_counter = 0; void cpu_boost(bool on_off) { - static int counter = 0; if(on_off) { /* Boost the frequency if not already boosted */ - if(counter++ == 0) + if(boost_counter++ == 0) { set_cpu_frequency(CPUFREQ_MAX); } @@ -43,14 +43,14 @@ void cpu_boost(bool on_off) else { /* Lower the frequency if the counter reaches 0 */ - if(--counter == 0) + if(--boost_counter == 0) { set_cpu_frequency(CPUFREQ_NORMAL); } /* Safety measure */ - if(counter < 0) - counter = 0; + if(boost_counter < 0) + boost_counter = 0; } } #endif -- cgit v1.2.3