From e90f961593e92fa5d98efa67b569e7efe5f4fbe0 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sat, 29 Oct 2011 17:08:05 +0000 Subject: Sansa clip zip: update mkamsboot and fix various drivers to make it boot to the main firmware git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30853 a1c6a512-1295-4272-9138-f99709370657 --- .../arm/as3525/sansa-clipzip/backlight-clipzip.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c') diff --git a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c index 758aa875cc..589f80436e 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c +++ b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c @@ -25,11 +25,14 @@ #include "lcd.h" #include "as3525v2.h" #include "ascodec-target.h" +#include "lcd-target.h" bool _backlight_init() { /* GPIO B1 controls backlight */ GPIOB_DIR |= (1 << 1); + ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91); + GPIOB_PIN(1) = (1 << 1); return true; } @@ -37,13 +40,6 @@ bool _backlight_init() void _backlight_on(void) { GPIOB_PIN(1) = (1 << 1); - - ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91); - sleep(1); - ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91); - sleep(1); - ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91); - #ifdef HAVE_LCD_ENABLE lcd_enable(true); #endif @@ -54,9 +50,11 @@ void _backlight_off(void) #ifdef HAVE_LCD_ENABLE lcd_enable(false); #endif - GPIOB_PIN(1) = 0; - - ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x91); +} + +void _backlight_set_brightness(int brightness) +{ + oled_brightness(brightness); } -- cgit v1.2.3