diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2010-07-22 15:31:24 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2010-07-22 15:31:24 +0000 |
commit | 55a4520f076ffa5190aac1f24f584e759ffc62cf (patch) | |
tree | a7a78f2192dfd05082d8909608be6c029e6627a4 /firmware/target/arm/as3525/sansa-clip/lcd-clip.c | |
parent | 10e79de27c6c71360bfe4e740098cb7e6ff64c2a (diff) | |
download | rockbox-55a4520f076ffa5190aac1f24f584e759ffc62cf.tar.gz rockbox-55a4520f076ffa5190aac1f24f584e759ffc62cf.zip |
Sansa clip+: fix display brightness for players with newer OLED controller type (and reorganise the variant detection a bit in the process)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27522 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip/lcd-clip.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/lcd-clip.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c index 775988cc0e..21d8902739 100644 --- a/firmware/target/arm/as3525/sansa-clip/lcd-clip.c +++ b/firmware/target/arm/as3525/sansa-clip/lcd-clip.c | |||
@@ -25,8 +25,11 @@ | |||
25 | #include "lcd-clip.h" | 25 | #include "lcd-clip.h" |
26 | #include "system.h" | 26 | #include "system.h" |
27 | #include "cpu.h" | 27 | #include "cpu.h" |
28 | #include "ascodec.h" | ||
28 | 29 | ||
29 | void lcd_hw_init(int *offset) | 30 | #define LCD_DELAY 1 |
31 | |||
32 | int lcd_hw_init(void) | ||
30 | { | 33 | { |
31 | /* DBOP initialisation, do what OF does */ | 34 | /* DBOP initialisation, do what OF does */ |
32 | CGU_DBOP = (1<<3) | AS3525_DBOP_DIV; | 35 | CGU_DBOP = (1<<3) | AS3525_DBOP_DIV; |
@@ -46,11 +49,9 @@ void lcd_hw_init(int *offset) | |||
46 | GPIOA_PIN(4) = 0; | 49 | GPIOA_PIN(4) = 0; |
47 | GPIOB_PIN(6) = (1<<6); | 50 | GPIOB_PIN(6) = (1<<6); |
48 | 51 | ||
49 | *offset = 2; | 52 | return 0; |
50 | } | 53 | } |
51 | 54 | ||
52 | #define LCD_DELAY 1 | ||
53 | |||
54 | void lcd_write_command(int byte) | 55 | void lcd_write_command(int byte) |
55 | { | 56 | { |
56 | volatile int i = 0; | 57 | volatile int i = 0; |
@@ -90,3 +91,9 @@ void lcd_write_data(const fb_data* p_bytes, int count) | |||
90 | /* While push fifo is not empty */ | 91 | /* While push fifo is not empty */ |
91 | while ((DBOP_STAT & (1<<10)) == 0); | 92 | while ((DBOP_STAT & (1<<10)) == 0); |
92 | } | 93 | } |
94 | |||
95 | void lcd_enable_power(bool onoff) | ||
96 | { | ||
97 | ascodec_write(AS3514_DCDC15, onoff ? 1 : 0); | ||
98 | } | ||
99 | |||