summaryrefslogtreecommitdiff
path: root/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c')
-rw-r--r--firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
index 8f7c30b5d7..9abf34ccf9 100644
--- a/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
+++ b/firmware/target/arm/gigabeat/meg-fx/backlight-meg-fx.c
@@ -21,18 +21,25 @@
#include "system.h"
#include "backlight.h"
#include "lcd.h"
+#include "sc606-meg-fx.h"
+
+int confval = SC606_LOW_FREQ;
void __backlight_on(void)
{
+ confval |= (SC606_LED_A1 | SC606_LED_A2);
+ sc606_write(SC606_REG_CONF, confval);
}
void __backlight_off(void)
{
+ confval &= ~(SC606_LED_A1 | SC606_LED_A2);
+ sc606_write(SC606_REG_CONF, confval);
}
-void __backlight_set_brightness(int val)
+void __backlight_set_brightness(int brightness)
{
- /* The SC606 LED driver of the gigabeat series
- * can set the brightness in 64 steps */
- val &= 0x3F;
+ /* The SC606 LED driver can set the brightness in 64 steps */
+ brightness &= 0x3F;
+ sc606_write(SC606_REG_A, brightness);
}