summaryrefslogtreecommitdiff
path: root/firmware/backlight.c
diff options
context:
space:
mode:
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