diff options
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-100/lcd-mr100.c')
-rw-r--r-- | firmware/target/arm/olympus/mrobe-100/lcd-mr100.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c index d3c913f4d7..9299b131f2 100644 --- a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c +++ b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c | |||
@@ -76,17 +76,6 @@ void lcd_write_command(int byte) | |||
76 | LCD1_CMD = byte; | 76 | LCD1_CMD = byte; |
77 | } | 77 | } |
78 | 78 | ||
79 | /* send LCD data */ | ||
80 | |||
81 | void lcd_write_data(const fb_data* p_bytes, int count) | ||
82 | { | ||
83 | while (count--) | ||
84 | { | ||
85 | while (LCD1_CONTROL & LCD1_BUSY_MASK); /* wait for LCD */ | ||
86 | LCD1_DATA = *(p_bytes++); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | static int xoffset; /* needed for flip */ | 79 | static int xoffset; /* needed for flip */ |
91 | 80 | ||
92 | /*** hardware configuration ***/ | 81 | /*** hardware configuration ***/ |
@@ -146,8 +135,7 @@ void lcd_init_device(void) | |||
146 | LCD1_CONTROL |= 0x4; | 135 | LCD1_CONTROL |= 0x4; |
147 | udelay(10); | 136 | udelay(10); |
148 | 137 | ||
149 | LCD1_CONTROL = 0x690; | 138 | LCD1_CONTROL = 0x0094; |
150 | LCD1_CONTROL = 0x694; | ||
151 | 139 | ||
152 | /* OF just reads these */ | 140 | /* OF just reads these */ |
153 | LCD1_CONTROL; | 141 | LCD1_CONTROL; |
@@ -206,18 +194,30 @@ void lcd_blit_mono(const unsigned char* data, int x, int by, int width, | |||
206 | } | 194 | } |
207 | } | 195 | } |
208 | 196 | ||
197 | /* Helper function for lcd_grey_phase_blit(). */ | ||
198 | void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | ||
199 | |||
209 | /* Performance function that works with an external buffer | 200 | /* Performance function that works with an external buffer |
210 | note that by and bheight are in 8-pixel units! */ | 201 | note that by and bheight are in 8-pixel units! */ |
211 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, | 202 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
212 | int x, int by, int width, int bheight, int stride) | 203 | int x, int by, int width, int bheight, int stride) |
213 | { | 204 | { |
214 | (void)values; | 205 | int cmd1, cmd2; |
215 | (void)phases; | 206 | |
216 | (void)x; | 207 | stride <<= 3; /* 8 pixels per block */ |
217 | (void)by; | 208 | cmd1 = LCD_CNTL_HIGHCOL | (((x + xoffset) >> 4) & 0xf); |
218 | (void)width; | 209 | cmd2 = LCD_CNTL_LOWCOL | ((x + xoffset) & 0xf); |
219 | (void)bheight; | 210 | |
220 | (void)stride; | 211 | while (bheight--) |
212 | { | ||
213 | lcd_write_command(LCD_CNTL_PAGE | (by++ & 0xff)); | ||
214 | lcd_write_command(cmd1); | ||
215 | lcd_write_command(cmd2); | ||
216 | |||
217 | lcd_grey_data(values, phases, width); | ||
218 | values += stride; | ||
219 | phases += stride; | ||
220 | } | ||
221 | } | 221 | } |
222 | 222 | ||
223 | /* Update the display. | 223 | /* Update the display. |