diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-09-01 22:03:14 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-09-01 22:03:14 +0000 |
commit | 7d8c5aaf6ac05eea2ea1fb3a3af938c68372264e (patch) | |
tree | cb4ee87bb9ffc21b087136ef983fde3c1b26c7c1 /firmware/timer.c | |
parent | e7a9ec4d13078497e00ccb370abad63fc9d12be9 (diff) | |
download | rockbox-7d8c5aaf6ac05eea2ea1fb3a3af938c68372264e.tar.gz rockbox-7d8c5aaf6ac05eea2ea1fb3a3af938c68372264e.tar.bz2 rockbox-7d8c5aaf6ac05eea2ea1fb3a3af938c68372264e.zip |
Make backlight fading work again on PP targets. The PP timer cannot handle a (real) cycle count of 1, the minimum is 2. This is now checked in timer_register() and timer_set_period().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10849 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/timer.c')
-rw-r--r-- | firmware/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/timer.c b/firmware/timer.c index 8523805890..84d0359008 100644 --- a/firmware/timer.c +++ b/firmware/timer.c @@ -60,7 +60,7 @@ void TIMER2(void) } if (pfn_timer != NULL) { - cycles_new = -1; + cycles_new = -1; /* "lock" the variable, in case timer_set_period() * is called within pfn_timer() */ pfn_timer(); @@ -151,7 +151,7 @@ static bool timer_set(long cycles, bool start) TCN1 = 0; /* reset the timer */ TER1 = 0xff; /* clear all events */ #elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 - if (cycles > 0x20000000) + if (cycles > 0x20000000 || cycles < 2) return false; if (start) |