summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2005-12-22 10:43:36 +0000
committerHristo Kovachev <bger@rockbox.org>2005-12-22 10:43:36 +0000
commit9b83c6c4bddca41411d31b8aab17ecc577b37eb4 (patch)
tree3311cff5a451e4462e02feffdfe4ddc610eeb6e5 /firmware/backlight.c
parent9d67765cae62e873c3d004bf9bcb68947f1568f6 (diff)
downloadrockbox-9b83c6c4bddca41411d31b8aab17ecc577b37eb4.tar.gz
rockbox-9b83c6c4bddca41411d31b8aab17ecc577b37eb4.zip
Patch No 1387627 by Peter D'Hoye: Backlight Brightness setting for H300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8280 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/backlight.c')
-rw-r--r--firmware/backlight.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 291c5da8e7..d118830721 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -30,6 +30,10 @@
30#include "timer.h" 30#include "timer.h"
31#include "backlight.h" 31#include "backlight.h"
32 32
33#ifdef HAVE_BACKLIGHT_BRIGHTNESS
34#include "pcf50606.h" /* iRiver brightness */
35#endif
36
33#if CONFIG_BACKLIGHT == BL_IRIVER_H300 37#if CONFIG_BACKLIGHT == BL_IRIVER_H300
34#include "lcd.h" /* for lcd_enable() */ 38#include "lcd.h" /* for lcd_enable() */
35#endif 39#endif
@@ -538,3 +542,13 @@ void remote_backlight_set_timeout(int index) {(void)index;}
538#endif 542#endif
539#endif /* #ifdef CONFIG_BACKLIGHT */ 543#endif /* #ifdef CONFIG_BACKLIGHT */
540 544
545#ifdef HAVE_BACKLIGHT_BRIGHTNESS
546void backlight_set_brightness(int val)
547{
548 /* set H300 brightness by changing the PWM
549 accepts 0..15 but note that 0 and 1 give a black display! */
550 unsigned char ucVal = (unsigned char)(val & 0x0F);
551 pcf50606_set_bl_pwm(ucVal);
552}
553#endif
554