From cfb073c452c0218a82e23fb5f5f89043719f2c07 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 3 Oct 2005 09:24:36 +0000 Subject: Coldfire: New timer handling on CPU frequency change, adjusting the prescaler on the fly, for both tick and user timer. Precondition is that the higher frequencies are integer multiples of the base: now NORMAL is 45 MHz and MAX is 124 MHz. Removes the need for applications with longer timer periods (>= 10 ms) to boost the CPU all the time, e.g. the grayscale lib. Timer counts are now always based on the base frequency (CPU_FREQ). * Adjusted the RAM refresh timers to the new frequencies (all frequencies for H100) * All: Fixed the tick timer count being off by one. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7576 a1c6a512-1295-4272-9138-f99709370657 --- firmware/backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/backlight.c') diff --git a/firmware/backlight.c b/firmware/backlight.c index 675237157b..ecd4403d88 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -81,7 +81,7 @@ static void backlight_isr(void) int timer_period; bool idle = false; - timer_period = FREQ / 1000 * BL_PWM_INTERVAL / 1000; + timer_period = CPU_FREQ / 1000 * BL_PWM_INTERVAL / 1000; switch (bl_dim_state) { /* New cycle */ -- cgit v1.2.3