diff options
Diffstat (limited to 'firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c')
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c index 54466f428b..8a268db4cc 100644 --- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "lcd.h" | 23 | #include "lcd.h" |
24 | #include "system.h" | 24 | #include "system.h" |
25 | #include "cpu.h" | 25 | #include "cpu.h" |
26 | #include "i2c.h" | ||
27 | 26 | ||
28 | /* GPIO A pins for LCD panel SDI interface */ | 27 | /* GPIO A pins for LCD panel SDI interface */ |
29 | 28 | ||
@@ -100,16 +99,6 @@ static void lcd_write_reg(unsigned char reg, unsigned short val) | |||
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||
103 | /* TODO: The existing pcf50606 drivers are target-specific, so the following | ||
104 | lonely function exists until a D2 driver exists. */ | ||
105 | |||
106 | void pcf50606_write_reg(unsigned char reg, unsigned char val) | ||
107 | { | ||
108 | unsigned char data[] = { reg, val }; | ||
109 | i2c_write(0x10, data, 2); | ||
110 | } | ||
111 | |||
112 | |||
113 | /* | 102 | /* |
114 | TEMP: Rough millisecond delay routine used by the LCD panel init sequence. | 103 | TEMP: Rough millisecond delay routine used by the LCD panel init sequence. |
115 | PCK_TCT must first have been initialised to 2Mhz by calling clock_init(). | 104 | PCK_TCT must first have been initialised to 2Mhz by calling clock_init(). |
@@ -190,9 +179,6 @@ static void lcd_display_on(void) | |||
190 | lcd_write_reg(10, 0x111F); | 179 | lcd_write_reg(10, 0x111F); |
191 | sleep_ms(10); | 180 | sleep_ms(10); |
192 | 181 | ||
193 | pcf50606_write_reg(0x35, 0xe9); /* PWMC1 - backlight power (intensity) */ | ||
194 | pcf50606_write_reg(0x38, 0x3); /* GPOC1 - ? */ | ||
195 | |||
196 | /* tell that we're on now */ | 182 | /* tell that we're on now */ |
197 | display_on = true; | 183 | display_on = true; |
198 | } | 184 | } |
@@ -213,9 +199,6 @@ static void lcd_display_off(void) | |||
213 | 199 | ||
214 | /* kill power to LCD panel (unconfirmed) */ | 200 | /* kill power to LCD panel (unconfirmed) */ |
215 | GPIOA_CLEAR = (1<<16); | 201 | GPIOA_CLEAR = (1<<16); |
216 | |||
217 | /* also kill the backlight, otherwise LCD fade is visible on screen */ | ||
218 | GPIOA_CLEAR = (1<<6); | ||
219 | } | 202 | } |
220 | 203 | ||
221 | 204 | ||
@@ -226,14 +209,14 @@ void lcd_enable(bool on) | |||
226 | 209 | ||
227 | if (on) | 210 | if (on) |
228 | { | 211 | { |
212 | lcd_display_on(); | ||
229 | LCDC_CTRL |= 1; /* controller enable */ | 213 | LCDC_CTRL |= 1; /* controller enable */ |
230 | GPIOA_SET = (1<<6); /* backlight enable - not visible otherwise */ | ||
231 | lcd_update(); /* Resync display */ | 214 | lcd_update(); /* Resync display */ |
232 | } | 215 | } |
233 | else | 216 | else |
234 | { | 217 | { |
235 | LCDC_CTRL &= ~1; /* controller disable */ | 218 | LCDC_CTRL &= ~1; /* controller disable */ |
236 | GPIOA_CLEAR = (1<<6); /* backlight off */ | 219 | lcd_display_off(); |
237 | } | 220 | } |
238 | } | 221 | } |
239 | 222 | ||
@@ -290,9 +273,6 @@ void lcd_init_device(void) | |||
290 | 273 | ||
291 | /* enable LTV250QV panel */ | 274 | /* enable LTV250QV panel */ |
292 | lcd_display_on(); | 275 | lcd_display_on(); |
293 | |||
294 | /* turn on the backlight, without it the LCD is not visible at all */ | ||
295 | GPIOA_SET = (1<<6); | ||
296 | } | 276 | } |
297 | 277 | ||
298 | 278 | ||