diff options
Diffstat (limited to 'firmware')
22 files changed, 117 insertions, 225 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 18a28d9569..6b2352f187 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -134,21 +134,21 @@ extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, | |||
134 | 134 | ||
135 | #ifdef HAVE_LCD_BITMAP | 135 | #ifdef HAVE_LCD_BITMAP |
136 | 136 | ||
137 | /* performance function */ | ||
137 | #if defined(HAVE_LCD_COLOR) | 138 | #if defined(HAVE_LCD_COLOR) |
138 | #define LCD_YUV_DITHER 0x1 | 139 | #define LCD_YUV_DITHER 0x1 |
139 | extern void lcd_yuv_set_options(unsigned options); | 140 | extern void lcd_yuv_set_options(unsigned options); |
140 | extern void lcd_yuv_blit(unsigned char * const src[3], | 141 | extern void lcd_blit_yuv(unsigned char * const src[3], |
141 | int src_x, int src_y, int stride, | 142 | int src_x, int src_y, int stride, |
142 | int x, int y, int width, int height); | 143 | int x, int y, int width, int height); |
143 | #else | 144 | #else |
144 | extern void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 145 | extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
146 | int bheight, int stride); | ||
147 | extern void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, | ||
145 | int bx, int by, int bwidth, int bheight, | 148 | int bx, int by, int bwidth, int bheight, |
146 | int stride); | 149 | int stride); |
147 | #endif | 150 | #endif |
148 | 151 | ||
149 | /* performance function */ | ||
150 | extern void lcd_blit(const fb_data* data, int x, int by, int width, | ||
151 | int bheight, int stride); | ||
152 | 152 | ||
153 | /* update a fraction of the screen */ | 153 | /* update a fraction of the screen */ |
154 | extern void lcd_update_rect(int x, int y, int width, int height); | 154 | extern void lcd_update_rect(int x, int y, int width, int height); |
diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c index b39ddbe77d..07258fa123 100644 --- a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c | |||
@@ -174,7 +174,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst, | |||
174 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 174 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
175 | /* For the Gigabeat - show it rotated */ | 175 | /* For the Gigabeat - show it rotated */ |
176 | /* So the LCD_WIDTH is now the height */ | 176 | /* So the LCD_WIDTH is now the height */ |
177 | void lcd_yuv_blit(unsigned char * const src[3], | 177 | void lcd_blit_yuv(unsigned char * const src[3], |
178 | int src_x, int src_y, int stride, | 178 | int src_x, int src_y, int stride, |
179 | int x, int y, int width, int height) | 179 | int x, int y, int width, int height) |
180 | { | 180 | { |
@@ -235,18 +235,6 @@ void lcd_set_invert_display(bool yesno) { | |||
235 | // TODO: | 235 | // TODO: |
236 | } | 236 | } |
237 | 237 | ||
238 | void lcd_blit(const fb_data* data, int bx, int y, int bwidth, | ||
239 | int height, int stride) | ||
240 | { | ||
241 | (void) data; | ||
242 | (void) bx; | ||
243 | (void) y; | ||
244 | (void) bwidth; | ||
245 | (void) height; | ||
246 | (void) stride; | ||
247 | //TODO: | ||
248 | } | ||
249 | |||
250 | void lcd_set_flip(bool yesno) { | 238 | void lcd_set_flip(bool yesno) { |
251 | (void) yesno; | 239 | (void) yesno; |
252 | // TODO: | 240 | // TODO: |
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c index b18b7ee712..482622bf57 100644 --- a/firmware/target/arm/ipod/lcd-color_nano.c +++ b/firmware/target/arm/ipod/lcd-color_nano.c | |||
@@ -109,20 +109,6 @@ void lcd_init_device(void) | |||
109 | 109 | ||
110 | /*** update functions ***/ | 110 | /*** update functions ***/ |
111 | 111 | ||
112 | /* Performance function that works with an external buffer | ||
113 | note that by and bheight are in 4-pixel units! */ | ||
114 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
115 | int bheight, int stride) | ||
116 | { | ||
117 | /* TODO: Implement lcd_blit() */ | ||
118 | (void)data; | ||
119 | (void)x; | ||
120 | (void)by; | ||
121 | (void)width; | ||
122 | (void)bheight; | ||
123 | (void)stride; | ||
124 | } | ||
125 | |||
126 | #define CSUB_X 2 | 112 | #define CSUB_X 2 |
127 | #define CSUB_Y 2 | 113 | #define CSUB_Y 2 |
128 | 114 | ||
@@ -155,7 +141,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width, | |||
155 | #define MAX_6BIT 0x3f | 141 | #define MAX_6BIT 0x3f |
156 | 142 | ||
157 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 143 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
158 | void lcd_yuv_blit(unsigned char * const src[3], | 144 | void lcd_blit_yuv(unsigned char * const src[3], |
159 | int src_x, int src_y, int stride, | 145 | int src_x, int src_y, int stride, |
160 | int x, int y, int width, int height) | 146 | int x, int y, int width, int height) |
161 | { | 147 | { |
diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c index b77d3eb7f6..e36a7efc1d 100644 --- a/firmware/target/arm/ipod/lcd-gray.c +++ b/firmware/target/arm/ipod/lcd-gray.c | |||
@@ -277,8 +277,8 @@ void lcd_mono_data(const unsigned char *data, int count); | |||
277 | 277 | ||
278 | /* Performance function that works with an external buffer | 278 | /* Performance function that works with an external buffer |
279 | note that x, bwidtht and stride are in 8-pixel units! */ | 279 | note that x, bwidtht and stride are in 8-pixel units! */ |
280 | void lcd_blit(const unsigned char* data, int bx, int y, int bwidth, | 280 | void lcd_blit_mono(const unsigned char *data, int bx, int y, int bwidth, |
281 | int height, int stride) | 281 | int height, int stride) |
282 | { | 282 | { |
283 | while (height--) | 283 | while (height--) |
284 | { | 284 | { |
@@ -295,7 +295,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | |||
295 | 295 | ||
296 | /* Performance function that works with an external buffer | 296 | /* Performance function that works with an external buffer |
297 | note that bx and bwidth are in 8-pixel units! */ | 297 | note that bx and bwidth are in 8-pixel units! */ |
298 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 298 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
299 | int bx, int y, int bwidth, int height, int stride) | 299 | int bx, int y, int bwidth, int height, int stride) |
300 | { | 300 | { |
301 | while (height--) | 301 | while (height--) |
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c index 0829114289..d0c82e905c 100644 --- a/firmware/target/arm/ipod/video/lcd-video.c +++ b/firmware/target/arm/ipod/video/lcd-video.c | |||
@@ -247,20 +247,6 @@ void lcd_init_device(void) | |||
247 | 247 | ||
248 | /*** update functions ***/ | 248 | /*** update functions ***/ |
249 | 249 | ||
250 | /* Performance function that works with an external buffer | ||
251 | note that by and bheight are in 4-pixel units! */ | ||
252 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
253 | int bheight, int stride) | ||
254 | { | ||
255 | /* TODO: Implement lcd_blit() */ | ||
256 | (void)data; | ||
257 | (void)x; | ||
258 | (void)by; | ||
259 | (void)width; | ||
260 | (void)bheight; | ||
261 | (void)stride; | ||
262 | } | ||
263 | |||
264 | /* Update a fraction of the display. */ | 250 | /* Update a fraction of the display. */ |
265 | void lcd_update_rect(int x, int y, int width, int height) | 251 | void lcd_update_rect(int x, int y, int width, int height) |
266 | { | 252 | { |
@@ -319,7 +305,7 @@ extern void lcd_write_yuv420_lines(unsigned char const * const src[3], | |||
319 | int stride); | 305 | int stride); |
320 | 306 | ||
321 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 307 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
322 | void lcd_yuv_blit(unsigned char * const src[3], | 308 | void lcd_blit_yuv(unsigned char * const src[3], |
323 | int src_x, int src_y, int stride, | 309 | int src_x, int src_y, int stride, |
324 | int x, int y, int width, int height) | 310 | int x, int y, int width, int height) |
325 | { | 311 | { |
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c index 892adffea9..2052be724c 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c | |||
@@ -381,20 +381,6 @@ void lcd_sleep(void) | |||
381 | 381 | ||
382 | /*** update functions ***/ | 382 | /*** update functions ***/ |
383 | 383 | ||
384 | /* Performance function that works with an external buffer | ||
385 | note that by and bheight are in 4-pixel units! */ | ||
386 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
387 | int bheight, int stride) | ||
388 | { | ||
389 | /* TODO: Implement lcd_blit() */ | ||
390 | (void)data; | ||
391 | (void)x; | ||
392 | (void)by; | ||
393 | (void)width; | ||
394 | (void)bheight; | ||
395 | (void)stride; | ||
396 | } | ||
397 | |||
398 | void lcd_yuv_set_options(unsigned options) | 384 | void lcd_yuv_set_options(unsigned options) |
399 | { | 385 | { |
400 | lcd_yuv_options = options; | 386 | lcd_yuv_options = options; |
@@ -411,7 +397,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3], | |||
411 | int y_screen); | 397 | int y_screen); |
412 | 398 | ||
413 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 399 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
414 | void lcd_yuv_blit(unsigned char * const src[3], | 400 | void lcd_blit_yuv(unsigned char * const src[3], |
415 | int src_x, int src_y, int stride, | 401 | int src_x, int src_y, int stride, |
416 | int x, int y, int width, int height) | 402 | int x, int y, int width, int height) |
417 | { | 403 | { |
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c index 8972fd1e9c..5b022e09c5 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c | |||
@@ -112,20 +112,6 @@ void lcd_init_device(void) | |||
112 | 112 | ||
113 | /*** update functions ***/ | 113 | /*** update functions ***/ |
114 | 114 | ||
115 | /* Performance function that works with an external buffer | ||
116 | note that by and bheight are in 4-pixel units! */ | ||
117 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
118 | int bheight, int stride) | ||
119 | { | ||
120 | /* TODO: Implement lcd_blit() */ | ||
121 | (void)data; | ||
122 | (void)x; | ||
123 | (void)by; | ||
124 | (void)width; | ||
125 | (void)bheight; | ||
126 | (void)stride; | ||
127 | } | ||
128 | |||
129 | #define CSUB_X 2 | 115 | #define CSUB_X 2 |
130 | #define CSUB_Y 2 | 116 | #define CSUB_Y 2 |
131 | 117 | ||
@@ -141,7 +127,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width, | |||
141 | #define ROUNDOFFSG (63*257) | 127 | #define ROUNDOFFSG (63*257) |
142 | 128 | ||
143 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 129 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
144 | void lcd_yuv_blit(unsigned char * const src[3], | 130 | void lcd_blit_yuv(unsigned char * const src[3], |
145 | int src_x, int src_y, int stride, | 131 | int src_x, int src_y, int stride, |
146 | int x, int y, int width, int height) | 132 | int x, int y, int width, int height) |
147 | { | 133 | { |
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c index c7977e63fc..9fb6790cc4 100644 --- a/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c +++ b/firmware/target/arm/olympus/mrobe-100/lcd-mr100.c | |||
@@ -118,8 +118,8 @@ void lcd_set_flip(bool yesno) | |||
118 | 118 | ||
119 | /* Performance function that works with an external buffer | 119 | /* Performance function that works with an external buffer |
120 | note that by and bheight are in 8-pixel units! */ | 120 | note that by and bheight are in 8-pixel units! */ |
121 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 121 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
122 | int bheight, int stride) | 122 | int bheight, int stride) |
123 | { | 123 | { |
124 | /* TODO: Implement lcd_blit() */ | 124 | /* TODO: Implement lcd_blit() */ |
125 | (void)data; | 125 | (void)data; |
@@ -132,7 +132,7 @@ void lcd_blit(const unsigned char* data, int x, int by, int width, | |||
132 | 132 | ||
133 | /* Performance function that works with an external buffer | 133 | /* Performance function that works with an external buffer |
134 | note that by and bheight are in 4-pixel units! */ | 134 | note that by and bheight are in 4-pixel units! */ |
135 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 135 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
136 | int x, int by, int width, int bheight, int stride) | 136 | int x, int by, int width, int bheight, int stride) |
137 | { | 137 | { |
138 | /* TODO: Implement lcd_grey_phase_blit() */ | 138 | /* TODO: Implement lcd_grey_phase_blit() */ |
diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c index 0aacd8af67..39caf66b69 100644 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c +++ b/firmware/target/arm/pnx0101/iriver-ifp7xx/lcd-ifp7xx.c | |||
@@ -145,8 +145,8 @@ void lcd_init_device(void) | |||
145 | 145 | ||
146 | /* Performance function that works with an external buffer | 146 | /* Performance function that works with an external buffer |
147 | note that by and bheight are in 8-pixel units! */ | 147 | note that by and bheight are in 8-pixel units! */ |
148 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 148 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
149 | int bheight, int stride) | 149 | int bheight, int stride) |
150 | { | 150 | { |
151 | /* Copy display bitmap to hardware */ | 151 | /* Copy display bitmap to hardware */ |
152 | while (bheight--) | 152 | while (bheight--) |
@@ -161,6 +161,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width, | |||
161 | } | 161 | } |
162 | 162 | ||
163 | 163 | ||
164 | /* Performance function that works with an external buffer | ||
165 | note that by and bheight are in 8-pixel units! */ | ||
166 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, | ||
167 | int x, int by, int width, int bheight, int stride) | ||
168 | { | ||
169 | (void)values; | ||
170 | (void)phases; | ||
171 | (void)x; | ||
172 | (void)by; | ||
173 | (void)width; | ||
174 | (void)bheight; | ||
175 | (void)stride; | ||
176 | } | ||
177 | |||
164 | /* Update the display. | 178 | /* Update the display. |
165 | This must be called after all other LCD functions that change the display. */ | 179 | This must be called after all other LCD functions that change the display. */ |
166 | void lcd_update(void) ICODE_ATTR; | 180 | void lcd_update(void) ICODE_ATTR; |
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c index fc8822ba50..0d532f62c9 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | |||
@@ -350,7 +350,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst, | |||
350 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 350 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
351 | /* For the Gigabeat - show it rotated */ | 351 | /* For the Gigabeat - show it rotated */ |
352 | /* So the LCD_WIDTH is now the height */ | 352 | /* So the LCD_WIDTH is now the height */ |
353 | void lcd_yuv_blit(unsigned char * const src[3], | 353 | void lcd_blit_yuv(unsigned char * const src[3], |
354 | int src_x, int src_y, int stride, | 354 | int src_x, int src_y, int stride, |
355 | int x, int y, int width, int height) | 355 | int x, int y, int width, int height) |
356 | { | 356 | { |
@@ -411,18 +411,6 @@ void lcd_set_invert_display(bool yesno) { | |||
411 | // TODO: | 411 | // TODO: |
412 | } | 412 | } |
413 | 413 | ||
414 | void lcd_blit(const fb_data* data, int bx, int y, int bwidth, | ||
415 | int height, int stride) | ||
416 | { | ||
417 | (void) data; | ||
418 | (void) bx; | ||
419 | (void) y; | ||
420 | (void) bwidth; | ||
421 | (void) height; | ||
422 | (void) stride; | ||
423 | //TODO: | ||
424 | } | ||
425 | |||
426 | void lcd_set_flip(bool yesno) { | 414 | void lcd_set_flip(bool yesno) { |
427 | (void) yesno; | 415 | (void) yesno; |
428 | // TODO: | 416 | // TODO: |
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c index b17cce30fa..fed4119077 100644 --- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c +++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | |||
@@ -195,20 +195,6 @@ void lcd_set_flip(bool yesno) | |||
195 | 195 | ||
196 | /*** update functions ***/ | 196 | /*** update functions ***/ |
197 | 197 | ||
198 | /* Performance function that works with an external buffer | ||
199 | note that by and bheight are in 4-pixel units! */ | ||
200 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
201 | int bheight, int stride) | ||
202 | { | ||
203 | /* TODO: Implement lcd_blit() */ | ||
204 | (void)data; | ||
205 | (void)x; | ||
206 | (void)by; | ||
207 | (void)width; | ||
208 | (void)bheight; | ||
209 | (void)stride; | ||
210 | } | ||
211 | |||
212 | void lcd_yuv_set_options(unsigned options) | 198 | void lcd_yuv_set_options(unsigned options) |
213 | { | 199 | { |
214 | lcd_yuv_options = options; | 200 | lcd_yuv_options = options; |
@@ -224,7 +210,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3], | |||
224 | int x_screen, /* To align dither pattern */ | 210 | int x_screen, /* To align dither pattern */ |
225 | int y_screen); | 211 | int y_screen); |
226 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 212 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
227 | void lcd_yuv_blit(unsigned char * const src[3], | 213 | void lcd_blit_yuv(unsigned char * const src[3], |
228 | int src_x, int src_y, int stride, | 214 | int src_x, int src_y, int stride, |
229 | int x, int y, int width, int height) | 215 | int x, int y, int width, int height) |
230 | { | 216 | { |
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c index e1212c9512..f2689eabbf 100644 --- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | |||
@@ -612,18 +612,6 @@ void lcd_set_flip(bool yesno) | |||
612 | 612 | ||
613 | /* Blitting functions */ | 613 | /* Blitting functions */ |
614 | 614 | ||
615 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
616 | int bheight, int stride) | ||
617 | { | ||
618 | /* TODO: Implement lcd_blit() */ | ||
619 | (void)data; | ||
620 | (void)x; | ||
621 | (void)by; | ||
622 | (void)width; | ||
623 | (void)bheight; | ||
624 | (void)stride; | ||
625 | } | ||
626 | |||
627 | void lcd_yuv_set_options(unsigned options) | 615 | void lcd_yuv_set_options(unsigned options) |
628 | { | 616 | { |
629 | lcd_yuv_options = options; | 617 | lcd_yuv_options = options; |
@@ -643,7 +631,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst, | |||
643 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 631 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
644 | /* For the e200 - show it rotated */ | 632 | /* For the e200 - show it rotated */ |
645 | /* So the LCD_WIDTH is now the height */ | 633 | /* So the LCD_WIDTH is now the height */ |
646 | void lcd_yuv_blit(unsigned char * const src[3], | 634 | void lcd_blit_yuv(unsigned char * const src[3], |
647 | int src_x, int src_y, int stride, | 635 | int src_x, int src_y, int stride, |
648 | int x, int y, int width, int height) | 636 | int x, int y, int width, int height) |
649 | { | 637 | { |
diff --git a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c index 53f32792c3..d563d55017 100644 --- a/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c +++ b/firmware/target/arm/tatung/tpj1022/lcd-tpj1022.c | |||
@@ -51,22 +51,8 @@ void lcd_init_device(void) | |||
51 | 51 | ||
52 | /*** update functions ***/ | 52 | /*** update functions ***/ |
53 | 53 | ||
54 | /* Performance function that works with an external buffer | ||
55 | note that by and bheight are in 4-pixel units! */ | ||
56 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
57 | int bheight, int stride) | ||
58 | { | ||
59 | /* TODO: Implement lcd_blit() */ | ||
60 | (void)data; | ||
61 | (void)x; | ||
62 | (void)by; | ||
63 | (void)width; | ||
64 | (void)bheight; | ||
65 | (void)stride; | ||
66 | } | ||
67 | |||
68 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 54 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
69 | void lcd_yuv_blit(unsigned char * const src[3], | 55 | void lcd_blit_yuv(unsigned char * const src[3], |
70 | int src_x, int src_y, int stride, | 56 | int src_x, int src_y, int stride, |
71 | int x, int y, int width, int height) | 57 | int x, int y, int width, int height) |
72 | { | 58 | { |
diff --git a/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c b/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c index 973d4cb333..4101f6ab7d 100644 --- a/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c +++ b/firmware/target/arm/tcc77x/logikdax/lcd-logikdax.c | |||
@@ -190,8 +190,8 @@ void lcd_init_device(void) | |||
190 | 190 | ||
191 | /* Performance function that works with an external buffer | 191 | /* Performance function that works with an external buffer |
192 | note that by and bheight are in 8-pixel units! */ | 192 | note that by and bheight are in 8-pixel units! */ |
193 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 193 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
194 | int bheight, int stride) | 194 | int bheight, int stride) |
195 | { | 195 | { |
196 | /* Copy display bitmap to hardware */ | 196 | /* Copy display bitmap to hardware */ |
197 | while (bheight--) | 197 | while (bheight--) |
@@ -206,6 +206,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width, | |||
206 | } | 206 | } |
207 | 207 | ||
208 | 208 | ||
209 | /* Performance function that works with an external buffer | ||
210 | note that by and bheight are in 8-pixel units! */ | ||
211 | void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases, | ||
212 | int x, int by, int width, int bheight, int stride) | ||
213 | { | ||
214 | (void)values; | ||
215 | (void)phases; | ||
216 | (void)x; | ||
217 | (void)by; | ||
218 | (void)width; | ||
219 | (void)bheight; | ||
220 | (void)stride; | ||
221 | } | ||
222 | |||
209 | /* Update the display. | 223 | /* Update the display. |
210 | This must be called after all other LCD functions that change the display. */ | 224 | This must be called after all other LCD functions that change the display. */ |
211 | void lcd_update(void) ICODE_ATTR; | 225 | void lcd_update(void) ICODE_ATTR; |
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c index 097dec31d3..54466f428b 100644 --- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | |||
@@ -370,18 +370,6 @@ void lcd_set_invert_display(bool yesno) | |||
370 | (void)yesno; | 370 | (void)yesno; |
371 | } | 371 | } |
372 | 372 | ||
373 | void lcd_blit(const fb_data* data, int bx, int y, int bwidth, | ||
374 | int height, int stride) | ||
375 | { | ||
376 | // TODO | ||
377 | (void)data; | ||
378 | (void)bx; | ||
379 | (void)y; | ||
380 | (void)bwidth; | ||
381 | (void)height; | ||
382 | (void)stride; | ||
383 | } | ||
384 | |||
385 | void lcd_yuv_set_options(unsigned options) | 373 | void lcd_yuv_set_options(unsigned options) |
386 | { | 374 | { |
387 | lcd_yuv_options = options; | 375 | lcd_yuv_options = options; |
@@ -400,7 +388,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst, | |||
400 | int y_screen); | 388 | int y_screen); |
401 | 389 | ||
402 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 390 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
403 | void lcd_yuv_blit(unsigned char * const src[3], | 391 | void lcd_blit_yuv(unsigned char * const src[3], |
404 | int src_x, int src_y, int stride, | 392 | int src_x, int src_y, int stride, |
405 | int x, int y, int width, int height) | 393 | int x, int y, int width, int height) |
406 | { | 394 | { |
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c index e4b36eb9be..241b82983c 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c | |||
@@ -163,7 +163,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst, | |||
163 | /* Performance function to blit a YUV bitmap directly to the LCD */ | 163 | /* Performance function to blit a YUV bitmap directly to the LCD */ |
164 | /* For the Gigabeat - show it rotated */ | 164 | /* For the Gigabeat - show it rotated */ |
165 | /* So the LCD_WIDTH is now the height */ | 165 | /* So the LCD_WIDTH is now the height */ |
166 | void lcd_yuv_blit(unsigned char * const src[3], | 166 | void lcd_blit_yuv(unsigned char * const src[3], |
167 | int src_x, int src_y, int stride, | 167 | int src_x, int src_y, int stride, |
168 | int x, int y, int width, int height) | 168 | int x, int y, int width, int height) |
169 | { | 169 | { |
@@ -210,18 +210,6 @@ void lcd_set_invert_display(bool yesno) { | |||
210 | // TODO: | 210 | // TODO: |
211 | } | 211 | } |
212 | 212 | ||
213 | void lcd_blit(const fb_data* data, int bx, int y, int bwidth, | ||
214 | int height, int stride) | ||
215 | { | ||
216 | (void) data; | ||
217 | (void) bx; | ||
218 | (void) y; | ||
219 | (void) bwidth; | ||
220 | (void) height; | ||
221 | (void) stride; | ||
222 | //TODO: | ||
223 | } | ||
224 | |||
225 | void lcd_set_flip(bool yesno) { | 213 | void lcd_set_flip(bool yesno) { |
226 | (void) yesno; | 214 | (void) yesno; |
227 | // TODO: | 215 | // TODO: |
diff --git a/firmware/target/coldfire/iaudio/m3/lcd-m3.c b/firmware/target/coldfire/iaudio/m3/lcd-m3.c index b1e81f91ba..ae72832a82 100644 --- a/firmware/target/coldfire/iaudio/m3/lcd-m3.c +++ b/firmware/target/coldfire/iaudio/m3/lcd-m3.c | |||
@@ -289,6 +289,35 @@ void lcd_write_data(const fb_data *p_words, int count) | |||
289 | CS_HI; | 289 | CS_HI; |
290 | } | 290 | } |
291 | 291 | ||
292 | static void lcd_mono_data(const unsigned char *p_words, int count) | ||
293 | { | ||
294 | unsigned data; | ||
295 | const unsigned char *p_bytes = p_words; | ||
296 | const unsigned char *p_end = p_words + count; | ||
297 | |||
298 | RS_HI; | ||
299 | CS_LO; | ||
300 | if (cpu_frequency < 50000000) | ||
301 | { | ||
302 | while (p_bytes < p_end) | ||
303 | { | ||
304 | data = *p_bytes++; | ||
305 | _write_fast(data); | ||
306 | _write_fast(data); | ||
307 | } | ||
308 | } | ||
309 | else | ||
310 | { | ||
311 | while (p_bytes < p_end) | ||
312 | { | ||
313 | data = *p_bytes++; | ||
314 | _write_byte(data); | ||
315 | _write_byte(data); | ||
316 | } | ||
317 | } | ||
318 | CS_HI; | ||
319 | } | ||
320 | |||
292 | int lcd_default_contrast(void) | 321 | int lcd_default_contrast(void) |
293 | { | 322 | { |
294 | return DEFAULT_CONTRAST_SETTING; | 323 | return DEFAULT_CONTRAST_SETTING; |
@@ -341,7 +370,7 @@ void lcd_on(void) | |||
341 | lcd_write_command_e(LCD_SET_GRAY | 6, 0xcc); | 370 | lcd_write_command_e(LCD_SET_GRAY | 6, 0xcc); |
342 | lcd_write_command_e(LCD_SET_GRAY | 7, 0x0c); | 371 | lcd_write_command_e(LCD_SET_GRAY | 7, 0x0c); |
343 | 372 | ||
344 | lcd_write_command(LCD_SET_PWM_FRC | 6); /* 4FRC + 12PWM */ | 373 | lcd_write_command(LCD_SET_PWM_FRC | 6); /* 3FRC + 12PWM */ |
345 | 374 | ||
346 | lcd_write_command(LCD_DISPLAY_ON | 1); /* display on */ | 375 | lcd_write_command(LCD_DISPLAY_ON | 1); /* display on */ |
347 | 376 | ||
@@ -428,24 +457,31 @@ void lcd_init_device(void) | |||
428 | #endif | 457 | #endif |
429 | } | 458 | } |
430 | 459 | ||
431 | /* TODO: implement blit functions */ | ||
432 | |||
433 | /* Performance function that works with an external buffer | 460 | /* Performance function that works with an external buffer |
434 | note that by and bheight are in 8-pixel units! */ | 461 | note that by and bheight are in 8-pixel units! */ |
435 | void lcd_blit(const fb_data *data, int x, int by, int width, | 462 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
436 | int bheight, int stride) | 463 | int bheight, int stride) |
437 | { | 464 | { |
438 | (void)data; | 465 | if (initialized) |
439 | (void)x; | 466 | { |
440 | (void)by; | 467 | /* COM48-COM63 are not connected, so we need to skip those */ |
441 | (void)width; | 468 | while (bheight--) |
442 | (void)bheight; | 469 | { |
443 | (void)stride; | 470 | lcd_write_command(LCD_SET_PAGE | ((by > 5 ? by + 2 : by) & 0xf)); |
471 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); | ||
472 | |||
473 | lcd_mono_data(data, width); | ||
474 | data += stride; | ||
475 | by++; | ||
476 | } | ||
477 | } | ||
444 | } | 478 | } |
445 | 479 | ||
480 | /* TODO: implement grey blit function */ | ||
481 | |||
446 | /* Performance function that works with an external buffer | 482 | /* Performance function that works with an external buffer |
447 | note that by and bheight are in 8-pixel units! */ | 483 | note that by and bheight are in 8-pixel units! */ |
448 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 484 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
449 | int x, int by, int width, int bheight, int stride) | 485 | int x, int by, int width, int bheight, int stride) |
450 | { | 486 | { |
451 | (void)values; | 487 | (void)values; |
@@ -463,7 +499,8 @@ void lcd_update(void) ICODE_ATTR; | |||
463 | void lcd_update(void) | 499 | void lcd_update(void) |
464 | { | 500 | { |
465 | int y; | 501 | int y; |
466 | if(initialized) { | 502 | if (initialized) |
503 | { | ||
467 | for(y = 0;y < LCD_FBHEIGHT;y++) { | 504 | for(y = 0;y < LCD_FBHEIGHT;y++) { |
468 | /* Copy display bitmap to hardware. | 505 | /* Copy display bitmap to hardware. |
469 | The COM48-COM63 lines are not connected so we have to skip | 506 | The COM48-COM63 lines are not connected so we have to skip |
@@ -480,7 +517,8 @@ void lcd_update(void) | |||
480 | void lcd_update_rect(int, int, int, int) ICODE_ATTR; | 517 | void lcd_update_rect(int, int, int, int) ICODE_ATTR; |
481 | void lcd_update_rect(int x, int y, int width, int height) | 518 | void lcd_update_rect(int x, int y, int width, int height) |
482 | { | 519 | { |
483 | if(initialized) { | 520 | if (initialized) |
521 | { | ||
484 | int ymax; | 522 | int ymax; |
485 | 523 | ||
486 | /* The Y coordinates have to work on even 8 pixel rows */ | 524 | /* The Y coordinates have to work on even 8 pixel rows */ |
diff --git a/firmware/target/coldfire/iaudio/m5/lcd-m5.c b/firmware/target/coldfire/iaudio/m5/lcd-m5.c index be9d5a39b8..71d49f544b 100644 --- a/firmware/target/coldfire/iaudio/m5/lcd-m5.c +++ b/firmware/target/coldfire/iaudio/m5/lcd-m5.c | |||
@@ -131,8 +131,8 @@ void lcd_init_device(void) | |||
131 | 131 | ||
132 | /* Performance function that works with an external buffer | 132 | /* Performance function that works with an external buffer |
133 | note that by and bheight are in 8-pixel units! */ | 133 | note that by and bheight are in 8-pixel units! */ |
134 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 134 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
135 | int bheight, int stride) | 135 | int bheight, int stride) |
136 | { | 136 | { |
137 | const unsigned char *src, *src_end; | 137 | const unsigned char *src, *src_end; |
138 | unsigned char *dst_u, *dst_l; | 138 | unsigned char *dst_u, *dst_l; |
@@ -176,7 +176,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | |||
176 | 176 | ||
177 | /* Performance function that works with an external buffer | 177 | /* Performance function that works with an external buffer |
178 | note that by and bheight are in 4-pixel units! */ | 178 | note that by and bheight are in 4-pixel units! */ |
179 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 179 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
180 | int x, int by, int width, int bheight, int stride) | 180 | int x, int by, int width, int bheight, int stride) |
181 | { | 181 | { |
182 | stride <<= 2; /* 4 pixels per block */ | 182 | stride <<= 2; /* 4 pixels per block */ |
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c index 5ca2cb508c..19faf0474d 100644 --- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c +++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c | |||
@@ -407,21 +407,6 @@ void lcd_sleep(void) | |||
407 | 407 | ||
408 | /*** update functions ***/ | 408 | /*** update functions ***/ |
409 | 409 | ||
410 | /* Performance function that works with an external buffer | ||
411 | note that by and bheight are in 8-pixel units! */ | ||
412 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
413 | int bheight, int stride) | ||
414 | { | ||
415 | /* TODO: Implement lcd_blit() */ | ||
416 | (void)data; | ||
417 | (void)x; | ||
418 | (void)by; | ||
419 | (void)width; | ||
420 | (void)bheight; | ||
421 | (void)stride; | ||
422 | /*if(display_on)*/ | ||
423 | } | ||
424 | |||
425 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. | 410 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. |
426 | * y should have two lines of Y back to back, 2nd line first. | 411 | * y should have two lines of Y back to back, 2nd line first. |
427 | * c should contain the Cb and Cr data for the two lines of Y back to back. | 412 | * c should contain the Cb and Cr data for the two lines of Y back to back. |
@@ -434,7 +419,7 @@ extern void lcd_write_yuv420_lines(const unsigned char *y, | |||
434 | * src_x, src_y, width and height should be even and within the LCD's | 419 | * src_x, src_y, width and height should be even and within the LCD's |
435 | * boundaries. | 420 | * boundaries. |
436 | */ | 421 | */ |
437 | void lcd_yuv_blit(unsigned char * const src[3], | 422 | void lcd_blit_yuv(unsigned char * const src[3], |
438 | int src_x, int src_y, int stride, | 423 | int src_x, int src_y, int stride, |
439 | int x, int y, int width, int height) | 424 | int x, int y, int width, int height) |
440 | { | 425 | { |
diff --git a/firmware/target/coldfire/iriver/h100/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c index 2ba19255da..fd22df81ef 100644 --- a/firmware/target/coldfire/iriver/h100/lcd-h100.c +++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c | |||
@@ -140,8 +140,8 @@ void lcd_init_device(void) | |||
140 | 140 | ||
141 | /* Performance function that works with an external buffer | 141 | /* Performance function that works with an external buffer |
142 | note that by and bheight are in 8-pixel units! */ | 142 | note that by and bheight are in 8-pixel units! */ |
143 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 143 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
144 | int bheight, int stride) | 144 | int bheight, int stride) |
145 | { | 145 | { |
146 | const unsigned char *src, *src_end; | 146 | const unsigned char *src, *src_end; |
147 | unsigned char *dst_u, *dst_l; | 147 | unsigned char *dst_u, *dst_l; |
@@ -185,7 +185,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | |||
185 | 185 | ||
186 | /* Performance function that works with an external buffer | 186 | /* Performance function that works with an external buffer |
187 | note that by and bheight are in 4-pixel units! */ | 187 | note that by and bheight are in 4-pixel units! */ |
188 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 188 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
189 | int x, int by, int width, int bheight, int stride) | 189 | int x, int by, int width, int bheight, int stride) |
190 | { | 190 | { |
191 | stride <<= 2; /* 4 pixels per block */ | 191 | stride <<= 2; /* 4 pixels per block */ |
diff --git a/firmware/target/coldfire/iriver/h300/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c index 00662e16f9..5081366d41 100644 --- a/firmware/target/coldfire/iriver/h300/lcd-h300.c +++ b/firmware/target/coldfire/iriver/h300/lcd-h300.c | |||
@@ -294,21 +294,6 @@ bool lcd_enabled(void) | |||
294 | 294 | ||
295 | /*** update functions ***/ | 295 | /*** update functions ***/ |
296 | 296 | ||
297 | /* Performance function that works with an external buffer | ||
298 | note that by and bheight are in 8-pixel units! */ | ||
299 | void lcd_blit(const fb_data* data, int x, int by, int width, | ||
300 | int bheight, int stride) | ||
301 | { | ||
302 | /* TODO: Implement lcd_blit() */ | ||
303 | (void)data; | ||
304 | (void)x; | ||
305 | (void)by; | ||
306 | (void)width; | ||
307 | (void)bheight; | ||
308 | (void)stride; | ||
309 | /*if(display_on)*/ | ||
310 | } | ||
311 | |||
312 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. | 297 | /* Line write helper function for lcd_yuv_blit. Write two lines of yuv420. |
313 | * y should have two lines of Y back to back, 2nd line first. | 298 | * y should have two lines of Y back to back, 2nd line first. |
314 | * c should contain the Cb and Cr data for the two lines of Y back to back. | 299 | * c should contain the Cb and Cr data for the two lines of Y back to back. |
@@ -321,7 +306,7 @@ extern void lcd_write_yuv420_lines(const unsigned char *y, | |||
321 | * src_x, src_y, width and height should be even | 306 | * src_x, src_y, width and height should be even |
322 | * x, y, width and height have to be within LCD bounds | 307 | * x, y, width and height have to be within LCD bounds |
323 | */ | 308 | */ |
324 | void lcd_yuv_blit(unsigned char * const src[3], | 309 | void lcd_blit_yuv(unsigned char * const src[3], |
325 | int src_x, int src_y, int stride, | 310 | int src_x, int src_y, int stride, |
326 | int x, int y, int width, int height) | 311 | int x, int y, int width, int height) |
327 | { | 312 | { |
diff --git a/firmware/target/sh/archos/lcd-archos-bitmap.c b/firmware/target/sh/archos/lcd-archos-bitmap.c index 18d48f4ead..bc17bd3950 100644 --- a/firmware/target/sh/archos/lcd-archos-bitmap.c +++ b/firmware/target/sh/archos/lcd-archos-bitmap.c | |||
@@ -140,8 +140,8 @@ void lcd_init_device(void) | |||
140 | 140 | ||
141 | /* Performance function that works with an external buffer | 141 | /* Performance function that works with an external buffer |
142 | note that by and bheight are in 8-pixel units! */ | 142 | note that by and bheight are in 8-pixel units! */ |
143 | void lcd_blit(const unsigned char* data, int x, int by, int width, | 143 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
144 | int bheight, int stride) | 144 | int bheight, int stride) |
145 | { | 145 | { |
146 | /* Copy display bitmap to hardware */ | 146 | /* Copy display bitmap to hardware */ |
147 | while (bheight--) | 147 | while (bheight--) |
@@ -160,7 +160,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | |||
160 | 160 | ||
161 | /* Performance function that works with an external buffer | 161 | /* Performance function that works with an external buffer |
162 | note that by and bheight are in 8-pixel units! */ | 162 | note that by and bheight are in 8-pixel units! */ |
163 | void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases, | 163 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
164 | int x, int by, int width, int bheight, int stride) | 164 | int x, int by, int width, int bheight, int stride) |
165 | { | 165 | { |
166 | stride <<= 3; /* 8 pixels per block */ | 166 | stride <<= 3; /* 8 pixels per block */ |