forked from len0rd/rockbox
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
This commit is contained in:
parent
e7a9ec4d13
commit
7d8c5aaf6a
2 changed files with 3 additions and 3 deletions
|
@ -303,7 +303,7 @@ static void backlight_dim(int value)
|
|||
if (bl_timer_active)
|
||||
return ;
|
||||
|
||||
if (timer_register(0, backlight_release_timer, 1, 0, backlight_isr))
|
||||
if (timer_register(0, backlight_release_timer, 2, 0, backlight_isr))
|
||||
{
|
||||
#ifdef CPU_COLDFIRE
|
||||
/* Prevent cpu frequency changes while dimming. */
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue