summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-01-16 14:45:03 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-01-16 14:45:03 +0000
commitb3a9ad85901885eb43f9b3d4474b67100e9ea747 (patch)
tree5ca896f551789a3d3a23b219f08e29f2a2cb9bef
parentd6d5da1841119eb9ad03a6e313e3d08307392a11 (diff)
The Code Police struck again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8352 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/backlight.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index b475c61fc0..25a91632cd 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -550,11 +550,10 @@ void remote_backlight_set_timeout(int index) {(void)index;}
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! */
- unsigned char ucVal = (unsigned char)(val & 0x0F);
- if(val<MIN_BRIGHTNESS_SETTING)
- val=MIN_BRIGHTNESS_SETTING;
- pcf50606_set_bl_pwm(ucVal);
+ accepts 0..15 but note that 0 and 1 gives a black display! */
+ if(val < MIN_BRIGHTNESS_SETTING)
+ val = MIN_BRIGHTNESS_SETTING;
+ pcf50606_set_bl_pwm(val & 0xf);
}
#endif