summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/mpio/hd200/lcd-hd200.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/mpio/hd200/lcd-hd200.c')
-rw-r--r--firmware/target/coldfire/mpio/hd200/lcd-hd200.c60
1 files changed, 41 insertions, 19 deletions
diff --git a/firmware/target/coldfire/mpio/hd200/lcd-hd200.c b/firmware/target/coldfire/mpio/hd200/lcd-hd200.c
index 8cb9e8e087..f3e9eef03b 100644
--- a/firmware/target/coldfire/mpio/hd200/lcd-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/lcd-hd200.c
@@ -215,27 +215,49 @@ void lcd_update_rect(int x, int y, int width, int height)
215 215
216} 216}
217 217
218void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, 218/* Helper function. */
219 int x, int by, int width, int bheight, int stride) 219void lcd_mono_data(const unsigned char *data, int count);
220{
221 (void)values;
222 (void)phases;
223 (void)x;
224 (void)by;
225 (void)width;
226 (void)bheight;
227 (void)stride;
228 /* empty stub */
229}
230 220
221/* Performance function that works with an external buffer
222 note that by and bheight are in 8-pixel units! */
231void lcd_blit_mono(const unsigned char *data, int x, int by, int width, 223void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
232 int bheight, int stride) 224 int bheight, int stride)
233{ 225{
234 (void)data; 226 if (lcd_initialized)
235 (void)x; 227 {
236 (void)by; 228 while (bheight--)
237 (void)width; 229 {
238 (void)bheight; 230 lcd_write_command(LCD_SET_PAGE | (by & 0xf));
239 (void)stride; 231 lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf);
240 /* empty stub */ 232
233 lcd_mono_data(data, width);
234 data += stride;
235 by++;
236 }
237 }
241} 238}
239
240/* Helper function for lcd_grey_phase_blit(). */
241void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
242
243/* Performance function that works with an external buffer
244 note that by and bheight are in 8-pixel units! */
245void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
246 int x, int by, int width, int bheight, int stride)
247{
248 if (lcd_initialized)
249 {
250 stride <<= 3; /* 8 pixels per block */
251 while (bheight--)
252 {
253 lcd_write_command(LCD_SET_PAGE | (by & 0xf));
254 lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf);
255
256 lcd_grey_data(values, phases, width);
257 values += stride;
258 phases += stride;
259 by++;
260 }
261 }
262}
263