summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-05-27 09:27:22 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-05-27 09:27:22 +0000
commit45975987b2a18b607c35e05aa7090f102246fdcc (patch)
tree192ccc5cdeafaafd8a4f775fff1da602d981e18d
parentce50b54caef8f4398e0ea9090da03a6c7fad2f33 (diff)
downloadrockbox-45975987b2a18b607c35e05aa7090f102246fdcc.tar.gz
rockbox-45975987b2a18b607c35e05aa7090f102246fdcc.tar.bz2
rockbox-45975987b2a18b607c35e05aa7090f102246fdcc.zip
code police
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9996 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/backlight.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index df13fa11ef..aac438c673 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -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 */