From 4926682378ea22225675a4155a4fd3e5671f1a1c Mon Sep 17 00:00:00 2001 From: Hristo Kovachev Date: Thu, 19 Jan 2006 13:10:15 +0000 Subject: Patch #1404233 by Peter D'Hoye: H300 brightness bugfix git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8387 a1c6a512-1295-4272-9138-f99709370657 --- firmware/backlight.c | 24 ++++++++++++++++++++---- firmware/drivers/pcf50606.c | 23 +---------------------- firmware/export/pcf50606.h | 1 - 3 files changed, 21 insertions(+), 27 deletions(-) (limited to 'firmware') diff --git a/firmware/backlight.c b/firmware/backlight.c index 25a91632cd..5e79e4e479 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -547,13 +547,29 @@ void remote_backlight_set_timeout(int index) {(void)index;} #endif /* #ifdef CONFIG_BACKLIGHT */ #ifdef HAVE_BACKLIGHT_BRIGHTNESS +#ifdef IRIVER_H300_SERIES void backlight_set_brightness(int val) { /* set H300 brightness by changing the PWM - 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); + accepts 0..15 but note that 0 and 1 give a black display! */ + val &= 0x0F; + if(val