summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/backlight.c')
-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