code police
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9996 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ce50b54cae
commit
45975987b2
1 changed files with 4 additions and 3 deletions
|
@ -660,6 +660,10 @@ void backlight_set_brightness(int val)
|
|||
{
|
||||
/* set H300 brightness by changing the PWM
|
||||
accepts 0..15 but note that 0 and 1 give a black display! */
|
||||
|
||||
/* disable IRQs while bitbanging */
|
||||
int old_irq_level = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
|
||||
val &= 0x0F;
|
||||
if(val<MIN_BRIGHTNESS_SETTING)
|
||||
val=MIN_BRIGHTNESS_SETTING;
|
||||
|
@ -670,9 +674,6 @@ void backlight_set_brightness(int val)
|
|||
/* enable PWM */
|
||||
val |= 0x01;
|
||||
|
||||
/* disable IRQs while bitbanging */
|
||||
int old_irq_level = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
|
||||
pcf50606_write(0x35, val);
|
||||
|
||||
/* enable IRQs again */
|
||||
|
|
Loading…
Reference in a new issue