diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-10-23 14:20:47 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-10-23 14:20:47 +0000 |
commit | 94c573f3eca59347cd397d6b68159997bb674246 (patch) | |
tree | 8baf49fd0e7571f84be4f3ce258473d2008efc22 | |
parent | bf831106f5edaa383f441cacabb1c8fe081c851f (diff) | |
download | rockbox-94c573f3eca59347cd397d6b68159997bb674246.tar.gz rockbox-94c573f3eca59347cd397d6b68159997bb674246.zip |
Sansa clipzip: miscellaneous updates
* add support for OF version 01.01.17 in mkamsboot
* introduce and implement oled_brightness function
* configure voltage CVDD2 to 2.8V (like the OF does)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30831 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c | 24 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipzip/lcd-target.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 6 | ||||
-rw-r--r-- | rbutil/mkamsboot/mkamsboot.c | 1 |
4 files changed, 24 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c index bfee2d253e..899eb538ea 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c +++ b/firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c | |||
@@ -336,18 +336,28 @@ static void lcd_setup_rect(int x, int x_end, int y, int y_end) | |||
336 | } | 336 | } |
337 | 337 | ||
338 | /* sets the brightness of the OLED */ | 338 | /* sets the brightness of the OLED */ |
339 | void lcd_brightness(uint8_t red, uint8_t green, uint8_t blue) | 339 | void oled_brightness(int brightness) |
340 | { | 340 | { |
341 | int r, g, b; | ||
342 | |||
341 | if (lcd_type == 0) { | 343 | if (lcd_type == 0) { |
342 | lcd_write(0x40, red); /* COLUMN_CURRENT_R */ | 344 | r = 2 + 16*brightness; |
343 | lcd_write(0x41, green); /* COLUMN_CURRENT_G */ | 345 | g = 1 + 10*brightness; |
344 | lcd_write(0x42, blue); /* COLUMN_CURRENT_B */ | 346 | b = 1 + (23*brightness)/2; |
347 | |||
348 | lcd_write(0x40, r); /* COLUMN_CURRENT_R */ | ||
349 | lcd_write(0x41, g); /* COLUMN_CURRENT_G */ | ||
350 | lcd_write(0x42, b); /* COLUMN_CURRENT_B */ | ||
345 | } | 351 | } |
346 | else { | 352 | else { |
353 | r = 6 + 10*brightness; | ||
354 | g = 1 + 6*brightness; | ||
355 | b = 3 + 10*brightness; | ||
356 | |||
347 | lcd_write_cmd(0x0E); | 357 | lcd_write_cmd(0x0E); |
348 | lcd_write_nibbles(red); | 358 | lcd_write_nibbles(r); |
349 | lcd_write_nibbles(green); | 359 | lcd_write_nibbles(g); |
350 | lcd_write_nibbles(blue); | 360 | lcd_write_nibbles(b); |
351 | } | 361 | } |
352 | } | 362 | } |
353 | 363 | ||
diff --git a/firmware/target/arm/as3525/sansa-clipzip/lcd-target.h b/firmware/target/arm/as3525/sansa-clipzip/lcd-target.h index 137e9731dd..4adf07554e 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/lcd-target.h +++ b/firmware/target/arm/as3525/sansa-clipzip/lcd-target.h | |||
@@ -23,5 +23,5 @@ | |||
23 | #include "config.h" | 23 | #include "config.h" |
24 | 24 | ||
25 | /* target-specific OLED brightness function */ | 25 | /* target-specific OLED brightness function */ |
26 | void lcd_brightness(uint8_t red, uint8_t green, uint8_t blue); | 26 | void oled_brightness(int brightness); |
27 | 27 | ||
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 348b4abcb2..a79b934aaa 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -285,7 +285,11 @@ void system_init(void) | |||
285 | ascodec_write_pmu(0x18, 1, 0x35); | 285 | ascodec_write_pmu(0x18, 1, 0x35); |
286 | /* AVDD17: set AVDD17 power supply to 2.5V */ | 286 | /* AVDD17: set AVDD17 power supply to 2.5V */ |
287 | ascodec_write_pmu(0x18, 7, 0x31); | 287 | ascodec_write_pmu(0x18, 7, 0x31); |
288 | #else | 288 | #ifdef SANSA_CLIPZIP |
289 | /* CVDD2: set CVDD2 power supply to 2.8V */ | ||
290 | ascodec_write_pmu(0x17, 2, 0xF4); | ||
291 | #endif | ||
292 | #else /* HAVE_AS3543 */ | ||
289 | ascodec_write(AS3514_CVDD_DCDC3, AS314_CP_DCDC3_SETTING); | 293 | ascodec_write(AS3514_CVDD_DCDC3, AS314_CP_DCDC3_SETTING); |
290 | #endif /* HAVE_AS3543 */ | 294 | #endif /* HAVE_AS3543 */ |
291 | 295 | ||
diff --git a/rbutil/mkamsboot/mkamsboot.c b/rbutil/mkamsboot/mkamsboot.c index c3ca69b329..c50fe9f5b4 100644 --- a/rbutil/mkamsboot/mkamsboot.c +++ b/rbutil/mkamsboot/mkamsboot.c | |||
@@ -174,6 +174,7 @@ static struct md5sums sansasums[] = { | |||
174 | #if 0 /* disabled for now because it's not been proven they can be patched */ | 174 | #if 0 /* disabled for now because it's not been proven they can be patched */ |
175 | { MODEL_CLIPZIP, "1.01.12", "45adea0873326b5af34f096e5c402f78" }, | 175 | { MODEL_CLIPZIP, "1.01.12", "45adea0873326b5af34f096e5c402f78" }, |
176 | { MODEL_CLIPZIP, "1.01.15", "f62af954334cd9ba1a87a7fa58ec6074" }, | 176 | { MODEL_CLIPZIP, "1.01.15", "f62af954334cd9ba1a87a7fa58ec6074" }, |
177 | { MODEL_CLIPZIP, "1.01.17", "27bcb343d6950f35dc261629e22ba60c" }, | ||
177 | #endif | 178 | #endif |
178 | }; | 179 | }; |
179 | 180 | ||