1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Linus Nielsen Feltzing 2005-03-07 10:51:43 +00:00
parent 5152eca7d4
commit 213d34ed1d
2 changed files with 59 additions and 23 deletions

View file

@ -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