summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2010-07-04 12:48:46 +0000
committerSzymon Dziok <b0hoon@o2.pl>2010-07-04 12:48:46 +0000
commit4171bc8e6454b1f071f1559a60806738ba611250 (patch)
tree3000848f6fd17b8d0d032b89393bd6b4f0249f61 /firmware
parenta902adf31b10ee69fbd7a5a3b6837e9563a05f2c (diff)
downloadrockbox-4171bc8e6454b1f071f1559a60806738ba611250.tar.gz
rockbox-4171bc8e6454b1f071f1559a60806738ba611250.tar.bz2
rockbox-4171bc8e6454b1f071f1559a60806738ba611250.zip
hdd6330: Enable buttonlights.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27276 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/philips/backlight-hdd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/firmware/target/arm/philips/backlight-hdd.c b/firmware/target/arm/philips/backlight-hdd.c
index cc8f04dda9..6c62d08438 100644
--- a/firmware/target/arm/philips/backlight-hdd.c
+++ b/firmware/target/arm/philips/backlight-hdd.c
@@ -55,6 +55,15 @@ void _buttonlight_on(void)
{
if (!buttonlight_status)
{
+#if defined(PHILIPS_HDD6330)
+ /* enable 3 leds (from 5) for PREV, PLAY and NEXT, */
+ /* skip 2 leds because their light does not pass */
+ /* through the panel anyway - on GPOs, module 0 */
+ touchpad_set_parameter(0x00,0x22,0x15);
+ /* enable 1 led (from 2) for MENU - GPO, module 1 */
+ /* no need to enable led for the hidden button */
+ touchpad_set_parameter(0x01,0x21,0x01);
+#endif
touchpad_set_buttonlights(BUTTONLIGHT_MASK, buttonight_brightness);
buttonlight_status = 1;
}
@@ -64,6 +73,11 @@ void _buttonlight_off(void)
{
if (buttonlight_status)
{
+#if defined(PHILIPS_HDD6330)
+ /* disable all leds on GPOs for module 0 and 1 */
+ touchpad_set_parameter(0x00,0x22,0x00);
+ touchpad_set_parameter(0x01,0x21,0x00);
+#endif
touchpad_set_buttonlights(BUTTONLIGHT_MASK, 0);
buttonlight_status = 0;
}
@@ -71,6 +85,10 @@ void _buttonlight_off(void)
void _buttonlight_set_brightness(int brightness)
{
+#if defined(PHILIPS_HDD6330)
+ touchpad_set_parameter(0x00,0x22,0x15);
+ touchpad_set_parameter(0x01,0x21,0x01);
+#endif
buttonight_brightness = brightness - 1;
touchpad_set_buttonlights(BUTTONLIGHT_MASK, buttonight_brightness);
buttonlight_status = 1;