diff options
31 files changed, 272 insertions, 405 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 6862ddb08e..15a7e9127f 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -74,6 +74,7 @@ static const struct plugin_api rockbox_api = { | |||
74 | /* lcd */ | 74 | /* lcd */ |
75 | lcd_set_contrast, | 75 | lcd_set_contrast, |
76 | lcd_update, | 76 | lcd_update, |
77 | lcd_update_rect, | ||
77 | lcd_clear_display, | 78 | lcd_clear_display, |
78 | lcd_setmargins, | 79 | lcd_setmargins, |
79 | lcd_getstringsize, | 80 | lcd_getstringsize, |
@@ -91,6 +92,7 @@ static const struct plugin_api rockbox_api = { | |||
91 | lcd_icon, | 92 | lcd_icon, |
92 | lcd_double_height, | 93 | lcd_double_height, |
93 | #else | 94 | #else |
95 | &lcd_framebuffer[0][0], | ||
94 | lcd_set_drawmode, | 96 | lcd_set_drawmode, |
95 | lcd_get_drawmode, | 97 | lcd_get_drawmode, |
96 | lcd_setfont, | 98 | lcd_setfont, |
@@ -115,21 +117,27 @@ static const struct plugin_api rockbox_api = { | |||
115 | #if LCD_DEPTH == 16 | 117 | #if LCD_DEPTH == 16 |
116 | lcd_bitmap_transparent_part, | 118 | lcd_bitmap_transparent_part, |
117 | lcd_bitmap_transparent, | 119 | lcd_bitmap_transparent, |
120 | lcd_blit_yuv, | ||
121 | #if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ | ||
122 | || defined (IRIVER_H10) | ||
123 | lcd_yuv_set_options, | ||
118 | #endif | 124 | #endif |
125 | #elif (LCD_DEPTH < 4) || !defined(SIMULATOR) | ||
126 | lcd_blit_mono, | ||
127 | lcd_blit_grey_phase, | ||
128 | #endif /* LCD_DEPTH */ | ||
129 | lcd_puts_style, | ||
130 | lcd_puts_scroll_style, | ||
119 | bidi_l2v, | 131 | bidi_l2v, |
120 | font_get_bits, | 132 | font_get_bits, |
121 | font_load, | 133 | font_load, |
122 | lcd_puts_style, | ||
123 | lcd_puts_scroll_style, | ||
124 | &lcd_framebuffer[0][0], | ||
125 | lcd_blit, | ||
126 | lcd_update_rect, | ||
127 | gui_scrollbar_draw, | ||
128 | font_get, | 134 | font_get, |
129 | font_getstringsize, | 135 | font_getstringsize, |
130 | font_get_width, | 136 | font_get_width, |
131 | screen_clear_area, | 137 | screen_clear_area, |
138 | gui_scrollbar_draw, | ||
132 | #endif | 139 | #endif |
140 | |||
133 | backlight_on, | 141 | backlight_on, |
134 | backlight_off, | 142 | backlight_off, |
135 | backlight_set_timeout, | 143 | backlight_set_timeout, |
@@ -137,6 +145,7 @@ static const struct plugin_api rockbox_api = { | |||
137 | backlight_set_timeout_plugged, | 145 | backlight_set_timeout_plugged, |
138 | #endif | 146 | #endif |
139 | gui_syncsplash, | 147 | gui_syncsplash, |
148 | |||
140 | #ifdef HAVE_REMOTE_LCD | 149 | #ifdef HAVE_REMOTE_LCD |
141 | /* remote lcd */ | 150 | /* remote lcd */ |
142 | lcd_remote_set_contrast, | 151 | lcd_remote_set_contrast, |
@@ -166,7 +175,11 @@ static const struct plugin_api rockbox_api = { | |||
166 | 175 | ||
167 | remote_backlight_on, | 176 | remote_backlight_on, |
168 | remote_backlight_off, | 177 | remote_backlight_off, |
178 | remote_backlight_set_timeout, | ||
179 | #if CONFIG_CHARGING | ||
180 | remote_backlight_set_timeout_plugged, | ||
169 | #endif | 181 | #endif |
182 | #endif /* HAVE_REMOTE_LCD */ | ||
170 | #if NB_SCREENS == 2 | 183 | #if NB_SCREENS == 2 |
171 | {&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]}, | 184 | {&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]}, |
172 | #else | 185 | #else |
@@ -181,16 +194,6 @@ static const struct plugin_api rockbox_api = { | |||
181 | lcd_remote_bitmap, | 194 | lcd_remote_bitmap, |
182 | #endif | 195 | #endif |
183 | 196 | ||
184 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR) | ||
185 | lcd_grey_phase_blit, | ||
186 | #endif | ||
187 | #if defined(HAVE_LCD_COLOR) | ||
188 | lcd_yuv_blit, | ||
189 | #endif | ||
190 | #if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ | ||
191 | || defined (IRIVER_H10) | ||
192 | lcd_yuv_set_options, | ||
193 | #endif | ||
194 | /* list */ | 197 | /* list */ |
195 | gui_synclist_init, | 198 | gui_synclist_init, |
196 | gui_synclist_set_nb_items, | 199 | gui_synclist_set_nb_items, |
@@ -233,9 +236,11 @@ static const struct plugin_api rockbox_api = { | |||
233 | ata_sleep, | 236 | ata_sleep, |
234 | ata_disk_is_active, | 237 | ata_disk_is_active, |
235 | #endif | 238 | #endif |
239 | ata_spin, | ||
236 | ata_spindown, | 240 | ata_spindown, |
237 | reload_directory, | 241 | reload_directory, |
238 | create_numbered_filename, | 242 | create_numbered_filename, |
243 | file_exists, | ||
239 | 244 | ||
240 | /* dir */ | 245 | /* dir */ |
241 | opendir, | 246 | opendir, |
@@ -243,6 +248,7 @@ static const struct plugin_api rockbox_api = { | |||
243 | readdir, | 248 | readdir, |
244 | mkdir, | 249 | mkdir, |
245 | rmdir, | 250 | rmdir, |
251 | dir_exists, | ||
246 | 252 | ||
247 | /* kernel/ system */ | 253 | /* kernel/ system */ |
248 | PREFIX(sleep), | 254 | PREFIX(sleep), |
@@ -256,6 +262,14 @@ static const struct plugin_api rockbox_api = { | |||
256 | threads, | 262 | threads, |
257 | create_thread, | 263 | create_thread, |
258 | remove_thread, | 264 | remove_thread, |
265 | thread_wait, | ||
266 | #if (CONFIG_CODEC == SWCODEC) | ||
267 | mutex_init, | ||
268 | mutex_lock, | ||
269 | mutex_unlock, | ||
270 | align_buffer, | ||
271 | #endif | ||
272 | |||
259 | reset_poweroff_timer, | 273 | reset_poweroff_timer, |
260 | #ifndef SIMULATOR | 274 | #ifndef SIMULATOR |
261 | system_memory_guard, | 275 | system_memory_guard, |
@@ -267,7 +281,15 @@ static const struct plugin_api rockbox_api = { | |||
267 | #else | 281 | #else |
268 | cpu_boost, | 282 | cpu_boost, |
269 | #endif | 283 | #endif |
284 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | ||
285 | #endif /* !SIMULATOR */ | ||
286 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | ||
287 | trigger_cpu_boost, | ||
288 | cancel_cpu_boost, | ||
270 | #endif | 289 | #endif |
290 | #ifdef CACHE_FUNCTIONS_AS_CALL | ||
291 | flush_icache, | ||
292 | invalidate_icache, | ||
271 | #endif | 293 | #endif |
272 | timer_register, | 294 | timer_register, |
273 | timer_unregister, | 295 | timer_unregister, |
@@ -277,6 +299,13 @@ static const struct plugin_api rockbox_api = { | |||
277 | queue_delete, | 299 | queue_delete, |
278 | queue_post, | 300 | queue_post, |
279 | queue_wait_w_tmo, | 301 | queue_wait_w_tmo, |
302 | #if CONFIG_CODEC == SWCODEC | ||
303 | queue_enable_queue_send, | ||
304 | queue_empty, | ||
305 | queue_wait, | ||
306 | queue_send, | ||
307 | queue_reply, | ||
308 | #endif | ||
280 | usb_acknowledge, | 309 | usb_acknowledge, |
281 | #ifdef RB_PROFILE | 310 | #ifdef RB_PROFILE |
282 | profile_thread, | 311 | profile_thread, |
@@ -325,13 +354,12 @@ static const struct plugin_api rockbox_api = { | |||
325 | utf8seek, | 354 | utf8seek, |
326 | 355 | ||
327 | /* sound */ | 356 | /* sound */ |
328 | #if CONFIG_CODEC == SWCODEC | ||
329 | sound_default, | ||
330 | #endif | ||
331 | sound_set, | 357 | sound_set, |
332 | 358 | sound_default, | |
333 | sound_min, | 359 | sound_min, |
334 | sound_max, | 360 | sound_max, |
361 | sound_unit, | ||
362 | sound_val2phys, | ||
335 | #ifndef SIMULATOR | 363 | #ifndef SIMULATOR |
336 | mp3_play_data, | 364 | mp3_play_data, |
337 | mp3_play_pause, | 365 | mp3_play_pause, |
@@ -353,6 +381,8 @@ static const struct plugin_api rockbox_api = { | |||
353 | pcm_play_pause, | 381 | pcm_play_pause, |
354 | pcm_get_bytes_waiting, | 382 | pcm_get_bytes_waiting, |
355 | pcm_calculate_peaks, | 383 | pcm_calculate_peaks, |
384 | pcm_play_lock, | ||
385 | pcm_play_unlock, | ||
356 | #ifdef HAVE_RECORDING | 386 | #ifdef HAVE_RECORDING |
357 | &rec_freq_sampr[0], | 387 | &rec_freq_sampr[0], |
358 | pcm_init_recording, | 388 | pcm_init_recording, |
@@ -367,6 +397,11 @@ static const struct plugin_api rockbox_api = { | |||
367 | audio_set_output_source, | 397 | audio_set_output_source, |
368 | audio_set_input_source, | 398 | audio_set_input_source, |
369 | #endif | 399 | #endif |
400 | dsp_set_crossfeed, | ||
401 | dsp_set_eq, | ||
402 | dsp_dither_enable, | ||
403 | dsp_configure, | ||
404 | dsp_process, | ||
370 | #endif /* CONFIG_CODEC == SWCODEC */ | 405 | #endif /* CONFIG_CODEC == SWCODEC */ |
371 | 406 | ||
372 | /* playback control */ | 407 | /* playback control */ |
@@ -508,35 +543,6 @@ static const struct plugin_api rockbox_api = { | |||
508 | detect_flashed_romimage, | 543 | detect_flashed_romimage, |
509 | #endif | 544 | #endif |
510 | led, | 545 | led, |
511 | #ifdef CACHE_FUNCTIONS_AS_CALL | ||
512 | flush_icache, | ||
513 | invalidate_icache, | ||
514 | #endif | ||
515 | /* new stuff at the end, sort into place next time | ||
516 | the API gets incompatible */ | ||
517 | |||
518 | #if (CONFIG_CODEC == SWCODEC) | ||
519 | mutex_init, | ||
520 | mutex_lock, | ||
521 | mutex_unlock, | ||
522 | #endif | ||
523 | |||
524 | thread_wait, | ||
525 | |||
526 | #if (CONFIG_CODEC == SWCODEC) | ||
527 | align_buffer, | ||
528 | #endif | ||
529 | |||
530 | file_exists, | ||
531 | dir_exists, | ||
532 | |||
533 | #ifdef HAVE_REMOTE_LCD | ||
534 | remote_backlight_set_timeout, | ||
535 | #if CONFIG_CHARGING | ||
536 | remote_backlight_set_timeout_plugged, | ||
537 | #endif | ||
538 | #endif /* HAVE_REMOTE_LCD */ | ||
539 | |||
540 | #if (CONFIG_CODEC == SWCODEC) | 546 | #if (CONFIG_CODEC == SWCODEC) |
541 | bufopen, | 547 | bufopen, |
542 | bufalloc, | 548 | bufalloc, |
@@ -569,29 +575,9 @@ static const struct plugin_api rockbox_api = { | |||
569 | search_albumart_files, | 575 | search_albumart_files, |
570 | #endif | 576 | #endif |
571 | 577 | ||
572 | #if CONFIG_CODEC == SWCODEC | 578 | /* new stuff at the end, sort into place next time |
573 | pcm_play_lock, | 579 | the API gets incompatible */ |
574 | pcm_play_unlock, | 580 | |
575 | queue_enable_queue_send, | ||
576 | queue_empty, | ||
577 | queue_wait, | ||
578 | queue_send, | ||
579 | queue_reply, | ||
580 | #ifndef HAVE_FLASH_STORAGE | ||
581 | ata_spin, | ||
582 | #endif | ||
583 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | ||
584 | trigger_cpu_boost, | ||
585 | cancel_cpu_boost, | ||
586 | #endif | ||
587 | sound_unit, | ||
588 | sound_val2phys, | ||
589 | dsp_set_crossfeed, | ||
590 | dsp_set_eq, | ||
591 | dsp_dither_enable, | ||
592 | dsp_configure, | ||
593 | dsp_process, | ||
594 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
595 | }; | 581 | }; |
596 | 582 | ||
597 | int plugin_load(const char* plugin, void* parameter) | 583 | int plugin_load(const char* plugin, void* parameter) |
diff --git a/apps/plugin.h b/apps/plugin.h index 164a2c9847..30c04ce76c 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -119,12 +119,12 @@ | |||
119 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 119 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
120 | 120 | ||
121 | /* increase this every time the api struct changes */ | 121 | /* increase this every time the api struct changes */ |
122 | #define PLUGIN_API_VERSION 99 | 122 | #define PLUGIN_API_VERSION 100 |
123 | 123 | ||
124 | /* update this to latest version if a change to the api struct breaks | 124 | /* update this to latest version if a change to the api struct breaks |
125 | backwards compatibility (and please take the opportunity to sort in any | 125 | backwards compatibility (and please take the opportunity to sort in any |
126 | new function which are "waiting" at the end of the function table) */ | 126 | new function which are "waiting" at the end of the function table) */ |
127 | #define PLUGIN_MIN_API_VERSION 98 | 127 | #define PLUGIN_MIN_API_VERSION 100 |
128 | 128 | ||
129 | /* plugin return codes */ | 129 | /* plugin return codes */ |
130 | enum plugin_status { | 130 | enum plugin_status { |
@@ -144,6 +144,7 @@ struct plugin_api { | |||
144 | /* lcd */ | 144 | /* lcd */ |
145 | void (*lcd_set_contrast)(int x); | 145 | void (*lcd_set_contrast)(int x); |
146 | void (*lcd_update)(void); | 146 | void (*lcd_update)(void); |
147 | void (*lcd_update_rect)(int x, int y, int width, int height); | ||
147 | void (*lcd_clear_display)(void); | 148 | void (*lcd_clear_display)(void); |
148 | void (*lcd_setmargins)(int x, int y); | 149 | void (*lcd_setmargins)(int x, int y); |
149 | int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h); | 150 | int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h); |
@@ -160,7 +161,8 @@ struct plugin_api { | |||
160 | void (*lcd_remove_cursor)(void); | 161 | void (*lcd_remove_cursor)(void); |
161 | void (*lcd_icon)(int icon, bool enable); | 162 | void (*lcd_icon)(int icon, bool enable); |
162 | void (*lcd_double_height)(bool on); | 163 | void (*lcd_double_height)(bool on); |
163 | #else | 164 | #else /* HAVE_LCD_BITMAP */ |
165 | fb_data* lcd_framebuffer; | ||
164 | void (*lcd_set_drawmode)(int mode); | 166 | void (*lcd_set_drawmode)(int mode); |
165 | int (*lcd_get_drawmode)(void); | 167 | int (*lcd_get_drawmode)(void); |
166 | void (*lcd_setfont)(int font); | 168 | void (*lcd_setfont)(int font); |
@@ -192,28 +194,40 @@ struct plugin_api { | |||
192 | int x, int y, int width, int height); | 194 | int x, int y, int width, int height); |
193 | void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y, | 195 | void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y, |
194 | int width, int height); | 196 | int width, int height); |
197 | void (*lcd_blit_yuv)(unsigned char * const src[3], | ||
198 | int src_x, int src_y, int stride, | ||
199 | int x, int y, int width, int height); | ||
200 | #if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ | ||
201 | || defined (IRIVER_H10) | ||
202 | void (*lcd_yuv_set_options)(unsigned options); | ||
195 | #endif | 203 | #endif |
196 | unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); | 204 | #elif (LCD_DEPTH < 4) || !defined(SIMULATOR) |
197 | const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); | 205 | void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, |
198 | struct font* (*font_load)(const char *path); | 206 | int bheight, int stride); |
207 | void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases, | ||
208 | int bx, int by, int bwidth, int bheight, | ||
209 | int stride); | ||
210 | #endif /* LCD_DEPTH */ | ||
199 | void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); | 211 | void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style); |
200 | void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, | 212 | void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string, |
201 | int style); | 213 | int style); |
202 | fb_data* lcd_framebuffer; | 214 | |
203 | void (*lcd_blit) (const fb_data* data, int x, int by, int width, | 215 | unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); |
204 | int bheight, int stride); | 216 | const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code ); |
205 | void (*lcd_update_rect)(int x, int y, int width, int height); | 217 | struct font* (*font_load)(const char *path); |
206 | void (*gui_scrollbar_draw)(struct screen * screen, int x, int y, | ||
207 | int width, int height, int items, | ||
208 | int min_shown, int max_shown, | ||
209 | unsigned flags); | ||
210 | struct font* (*font_get)(int font); | 218 | struct font* (*font_get)(int font); |
211 | int (*font_getstringsize)(const unsigned char *str, int *w, int *h, | 219 | int (*font_getstringsize)(const unsigned char *str, int *w, int *h, |
212 | int fontnumber); | 220 | int fontnumber); |
213 | int (*font_get_width)(struct font* pf, unsigned short char_code); | 221 | int (*font_get_width)(struct font* pf, unsigned short char_code); |
214 | void (*screen_clear_area)(struct screen * display, int xstart, int ystart, | 222 | void (*screen_clear_area)(struct screen * display, int xstart, int ystart, |
215 | int width, int height); | 223 | int width, int height); |
216 | #endif | 224 | void (*gui_scrollbar_draw)(struct screen * screen, int x, int y, |
225 | int width, int height, int items, | ||
226 | int min_shown, int max_shown, | ||
227 | unsigned flags); | ||
228 | #endif /* HAVE_LCD_BITMAP */ | ||
229 | |||
230 | /* backlight */ | ||
217 | void (*backlight_on)(void); | 231 | void (*backlight_on)(void); |
218 | void (*backlight_off)(void); | 232 | void (*backlight_off)(void); |
219 | void (*backlight_set_timeout)(int index); | 233 | void (*backlight_set_timeout)(int index); |
@@ -255,7 +269,11 @@ struct plugin_api { | |||
255 | 269 | ||
256 | void (*remote_backlight_on)(void); | 270 | void (*remote_backlight_on)(void); |
257 | void (*remote_backlight_off)(void); | 271 | void (*remote_backlight_off)(void); |
272 | void (*remote_backlight_set_timeout)(int index); | ||
273 | #if CONFIG_CHARGING | ||
274 | void (*remote_backlight_set_timeout_plugged)(int index); | ||
258 | #endif | 275 | #endif |
276 | #endif /* HAVE_REMOTE_LCD */ | ||
259 | struct screen* screens[NB_SCREENS]; | 277 | struct screen* screens[NB_SCREENS]; |
260 | #if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) | 278 | #if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) |
261 | void (*lcd_remote_set_foreground)(unsigned foreground); | 279 | void (*lcd_remote_set_foreground)(unsigned foreground); |
@@ -267,22 +285,6 @@ struct plugin_api { | |||
267 | void (*lcd_remote_bitmap)(const fb_remote_data *src, int x, int y, int width, | 285 | void (*lcd_remote_bitmap)(const fb_remote_data *src, int x, int y, int width, |
268 | int height); | 286 | int height); |
269 | #endif | 287 | #endif |
270 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR) | ||
271 | void (*lcd_grey_phase_blit)(unsigned char *values, unsigned char *phases, | ||
272 | int bx, int by, int bwidth, int bheight, | ||
273 | int stride); | ||
274 | #endif | ||
275 | #if defined(HAVE_LCD_COLOR) | ||
276 | void (*lcd_yuv_blit)(unsigned char * const src[3], | ||
277 | int src_x, int src_y, int stride, | ||
278 | int x, int y, int width, int height); | ||
279 | #endif | ||
280 | |||
281 | #if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \ | ||
282 | || defined (IRIVER_H10) | ||
283 | void (*lcd_yuv_set_options)(unsigned options); | ||
284 | #endif | ||
285 | |||
286 | /* list */ | 288 | /* list */ |
287 | void (*gui_synclist_init)(struct gui_synclist * lists, | 289 | void (*gui_synclist_init)(struct gui_synclist * lists, |
288 | list_get_name callback_get_item_name,void * data, | 290 | list_get_name callback_get_item_name,void * data, |
@@ -329,11 +331,14 @@ struct plugin_api { | |||
329 | void (*ata_sleep)(void); | 331 | void (*ata_sleep)(void); |
330 | bool (*ata_disk_is_active)(void); | 332 | bool (*ata_disk_is_active)(void); |
331 | #endif | 333 | #endif |
334 | void (*ata_spin)(void); | ||
332 | void (*ata_spindown)(int seconds); | 335 | void (*ata_spindown)(int seconds); |
333 | void (*reload_directory)(void); | 336 | void (*reload_directory)(void); |
334 | char *(*create_numbered_filename)(char *buffer, const char *path, | 337 | char *(*create_numbered_filename)(char *buffer, const char *path, |
335 | const char *prefix, const char *suffix, | 338 | const char *prefix, const char *suffix, |
336 | int numberlen IF_CNFN_NUM_(, int *num)); | 339 | int numberlen IF_CNFN_NUM_(, int *num)); |
340 | bool (*file_exists)(const char *file); | ||
341 | |||
337 | 342 | ||
338 | /* dir */ | 343 | /* dir */ |
339 | DIR* (*opendir)(const char* name); | 344 | DIR* (*opendir)(const char* name); |
@@ -341,6 +346,7 @@ struct plugin_api { | |||
341 | struct dirent* (*readdir)(DIR* dir); | 346 | struct dirent* (*readdir)(DIR* dir); |
342 | int (*mkdir)(const char *name); | 347 | int (*mkdir)(const char *name); |
343 | int (*rmdir)(const char *name); | 348 | int (*rmdir)(const char *name); |
349 | bool (*dir_exists)(const char *path); | ||
344 | 350 | ||
345 | /* kernel/ system */ | 351 | /* kernel/ system */ |
346 | void (*PREFIX(sleep))(int ticks); | 352 | void (*PREFIX(sleep))(int ticks); |
@@ -358,6 +364,14 @@ struct plugin_api { | |||
358 | IF_PRIO(, int priority) | 364 | IF_PRIO(, int priority) |
359 | IF_COP(, unsigned int core)); | 365 | IF_COP(, unsigned int core)); |
360 | void (*remove_thread)(struct thread_entry *thread); | 366 | void (*remove_thread)(struct thread_entry *thread); |
367 | void (*thread_wait)(struct thread_entry *thread); | ||
368 | #if CONFIG_CODEC == SWCODEC | ||
369 | void (*mutex_init)(struct mutex *m); | ||
370 | void (*mutex_lock)(struct mutex *m); | ||
371 | void (*mutex_unlock)(struct mutex *m); | ||
372 | size_t (*align_buffer)(void **start, size_t size, size_t align); | ||
373 | #endif | ||
374 | |||
361 | void (*reset_poweroff_timer)(void); | 375 | void (*reset_poweroff_timer)(void); |
362 | #ifndef SIMULATOR | 376 | #ifndef SIMULATOR |
363 | int (*system_memory_guard)(int newmode); | 377 | int (*system_memory_guard)(int newmode); |
@@ -368,7 +382,15 @@ struct plugin_api { | |||
368 | #else | 382 | #else |
369 | void (*cpu_boost)(bool on_off); | 383 | void (*cpu_boost)(bool on_off); |
370 | #endif | 384 | #endif |
385 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | ||
386 | #endif /* !SIMULATOR */ | ||
387 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | ||
388 | void (*trigger_cpu_boost)(void); | ||
389 | void (*cancel_cpu_boost)(void); | ||
371 | #endif | 390 | #endif |
391 | #ifdef CACHE_FUNCTIONS_AS_CALL | ||
392 | void (*flush_icache)(void); | ||
393 | void (*invalidate_icache)(void); | ||
372 | #endif | 394 | #endif |
373 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), | 395 | bool (*timer_register)(int reg_prio, void (*unregister_callback)(void), |
374 | long cycles, int int_prio, | 396 | long cycles, int int_prio, |
@@ -381,6 +403,16 @@ struct plugin_api { | |||
381 | void (*queue_post)(struct event_queue *q, long id, intptr_t data); | 403 | void (*queue_post)(struct event_queue *q, long id, intptr_t data); |
382 | void (*queue_wait_w_tmo)(struct event_queue *q, struct queue_event *ev, | 404 | void (*queue_wait_w_tmo)(struct event_queue *q, struct queue_event *ev, |
383 | int ticks); | 405 | int ticks); |
406 | #if CONFIG_CODEC == SWCODEC | ||
407 | void (*queue_enable_queue_send)(struct event_queue *q, | ||
408 | struct queue_sender_list *send); | ||
409 | bool (*queue_empty)(const struct event_queue *q); | ||
410 | void (*queue_wait)(struct event_queue *q, struct queue_event *ev); | ||
411 | intptr_t (*queue_send)(struct event_queue *q, long id, | ||
412 | intptr_t data); | ||
413 | void (*queue_reply)(struct event_queue *q, intptr_t retval); | ||
414 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
415 | |||
384 | void (*usb_acknowledge)(long id); | 416 | void (*usb_acknowledge)(long id); |
385 | #ifdef RB_PROFILE | 417 | #ifdef RB_PROFILE |
386 | void (*profile_thread)(void); | 418 | void (*profile_thread)(void); |
@@ -430,12 +462,12 @@ struct plugin_api { | |||
430 | int (*utf8seek)(const unsigned char* utf8, int offset); | 462 | int (*utf8seek)(const unsigned char* utf8, int offset); |
431 | 463 | ||
432 | /* sound */ | 464 | /* sound */ |
433 | #if CONFIG_CODEC == SWCODEC | ||
434 | int (*sound_default)(int setting); | ||
435 | #endif | ||
436 | void (*sound_set)(int setting, int value); | 465 | void (*sound_set)(int setting, int value); |
466 | int (*sound_default)(int setting); | ||
437 | int (*sound_min)(int setting); | 467 | int (*sound_min)(int setting); |
438 | int (*sound_max)(int setting); | 468 | int (*sound_max)(int setting); |
469 | const char * (*sound_unit)(int setting); | ||
470 | int (*sound_val2phys)(int setting, int value); | ||
439 | #ifndef SIMULATOR | 471 | #ifndef SIMULATOR |
440 | void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size)); | 472 | void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size)); |
441 | void (*mp3_play_pause)(bool play); | 473 | void (*mp3_play_pause)(bool play); |
@@ -458,6 +490,8 @@ struct plugin_api { | |||
458 | void (*pcm_play_pause)(bool play); | 490 | void (*pcm_play_pause)(bool play); |
459 | size_t (*pcm_get_bytes_waiting)(void); | 491 | size_t (*pcm_get_bytes_waiting)(void); |
460 | void (*pcm_calculate_peaks)(int *left, int *right); | 492 | void (*pcm_calculate_peaks)(int *left, int *right); |
493 | void (*pcm_play_lock)(void); | ||
494 | void (*pcm_play_unlock)(void); | ||
461 | #ifdef HAVE_RECORDING | 495 | #ifdef HAVE_RECORDING |
462 | const unsigned long *rec_freq_sampr; | 496 | const unsigned long *rec_freq_sampr; |
463 | void (*pcm_init_recording)(void); | 497 | void (*pcm_init_recording)(void); |
@@ -473,6 +507,13 @@ struct plugin_api { | |||
473 | void (*audio_set_output_source)(int monitor); | 507 | void (*audio_set_output_source)(int monitor); |
474 | void (*audio_set_input_source)(int source, unsigned flags); | 508 | void (*audio_set_input_source)(int source, unsigned flags); |
475 | #endif | 509 | #endif |
510 | void (*dsp_set_crossfeed)(bool enable); | ||
511 | void (*dsp_set_eq)(bool enable); | ||
512 | void (*dsp_dither_enable)(bool enable); | ||
513 | intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting, | ||
514 | intptr_t value); | ||
515 | int (*dsp_process)(struct dsp_config *dsp, char *dest, | ||
516 | const char *src[], int count); | ||
476 | #endif /* CONFIG_CODEC == SWCODC */ | 517 | #endif /* CONFIG_CODEC == SWCODC */ |
477 | 518 | ||
478 | /* playback control */ | 519 | /* playback control */ |
@@ -638,37 +679,8 @@ struct plugin_api { | |||
638 | 679 | ||
639 | void (*led)(bool on); | 680 | void (*led)(bool on); |
640 | 681 | ||
641 | #ifdef CACHE_FUNCTIONS_AS_CALL | ||
642 | void (*flush_icache)(void); | ||
643 | void (*invalidate_icache)(void); | ||
644 | #endif | ||
645 | |||
646 | /* new stuff at the end, sort into place next time | ||
647 | the API gets incompatible */ | ||
648 | |||
649 | #if (CONFIG_CODEC == SWCODEC) | ||
650 | void (*mutex_init)(struct mutex *m); | ||
651 | void (*mutex_lock)(struct mutex *m); | ||
652 | void (*mutex_unlock)(struct mutex *m); | ||
653 | #endif | ||
654 | |||
655 | void (*thread_wait)(struct thread_entry *thread); | ||
656 | |||
657 | #if (CONFIG_CODEC == SWCODEC) | ||
658 | size_t (*align_buffer)(void **start, size_t size, size_t align); | ||
659 | #endif | ||
660 | |||
661 | bool (*file_exists)(const char *file); | ||
662 | bool (*dir_exists)(const char *path); | ||
663 | |||
664 | #ifdef HAVE_REMOTE_LCD | ||
665 | void (*remote_backlight_set_timeout)(int index); | ||
666 | #if CONFIG_CHARGING | ||
667 | void (*remote_backlight_set_timeout_plugged)(int index); | ||
668 | #endif | ||
669 | #endif /* HAVE_REMOTE_LCD */ | ||
670 | |||
671 | #if (CONFIG_CODEC == SWCODEC) | 682 | #if (CONFIG_CODEC == SWCODEC) |
683 | /* buffering API */ | ||
672 | int (*bufopen)(const char *file, size_t offset, enum data_type type); | 684 | int (*bufopen)(const char *file, size_t offset, enum data_type type); |
673 | int (*bufalloc)(const void *src, size_t size, enum data_type type); | 685 | int (*bufalloc)(const void *src, size_t size, enum data_type type); |
674 | bool (*bufclose)(int handle_id); | 686 | bool (*bufclose)(int handle_id); |
@@ -704,33 +716,9 @@ struct plugin_api { | |||
704 | char *buf, int buflen); | 716 | char *buf, int buflen); |
705 | #endif | 717 | #endif |
706 | 718 | ||
707 | #if CONFIG_CODEC == SWCODEC | 719 | /* new stuff at the end, sort into place next time |
708 | void (*pcm_play_lock)(void); | 720 | the API gets incompatible */ |
709 | void (*pcm_play_unlock)(void); | 721 | |
710 | void (*queue_enable_queue_send)(struct event_queue *q, | ||
711 | struct queue_sender_list *send); | ||
712 | bool (*queue_empty)(const struct event_queue *q); | ||
713 | void (*queue_wait)(struct event_queue *q, struct queue_event *ev); | ||
714 | intptr_t (*queue_send)(struct event_queue *q, long id, | ||
715 | intptr_t data); | ||
716 | void (*queue_reply)(struct event_queue *q, intptr_t retval); | ||
717 | #ifndef HAVE_FLASH_STORAGE | ||
718 | void (*ata_spin)(void); | ||
719 | #endif | ||
720 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | ||
721 | void (*trigger_cpu_boost)(void); | ||
722 | void (*cancel_cpu_boost)(void); | ||
723 | #endif | ||
724 | const char * (*sound_unit)(int setting); | ||
725 | int (*sound_val2phys)(int setting, int value); | ||
726 | void (*dsp_set_crossfeed)(bool enable); | ||
727 | void (*dsp_set_eq)(bool enable); | ||
728 | void (*dsp_dither_enable)(bool enable); | ||
729 | intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting, | ||
730 | intptr_t value); | ||
731 | int (*dsp_process)(struct dsp_config *dsp, char *dest, | ||
732 | const char *src[], int count); | ||
733 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
734 | }; | 722 | }; |
735 | 723 | ||
736 | /* plugin header */ | 724 | /* plugin header */ |
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 7e6fda0bbc..0f7e24b551 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c | |||
@@ -1178,11 +1178,12 @@ static void chip8_update_display(void) | |||
1178 | } | 1178 | } |
1179 | #if defined(SIMULATOR) || (LCD_DEPTH > 1) | 1179 | #if defined(SIMULATOR) || (LCD_DEPTH > 1) |
1180 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1180 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1181 | rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT); | 1181 | rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, |
1182 | CHIP8_HEIGHT); | ||
1182 | rb->lcd_update(); | 1183 | rb->lcd_update(); |
1183 | #else | 1184 | #else |
1184 | rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3 | 1185 | rb->lcd_blit_mono(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, |
1185 | , CHIP8_LCDWIDTH); | 1186 | CHIP8_HEIGHT>>3, CHIP8_LCDWIDTH); |
1186 | #endif | 1187 | #endif |
1187 | } | 1188 | } |
1188 | 1189 | ||
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index 80daf494a0..caa7af2f25 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c | |||
@@ -239,12 +239,12 @@ static unsigned long _grey_get_pixel(int x, int y) | |||
239 | static void _timer_isr(void) | 239 | static void _timer_isr(void) |
240 | { | 240 | { |
241 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 241 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
242 | _grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases, | 242 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, |
243 | _grey_info.bx, _grey_info.y, | 243 | _grey_info.bx, _grey_info.y, |
244 | _grey_info.bwidth, _grey_info.height, | 244 | _grey_info.bwidth, _grey_info.height, |
245 | _grey_info.width); | 245 | _grey_info.width); |
246 | #else | 246 | #else |
247 | _grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases, | 247 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, |
248 | _grey_info.x, _grey_info.by, | 248 | _grey_info.x, _grey_info.by, |
249 | _grey_info.width, _grey_info.bheight, | 249 | _grey_info.width, _grey_info.bheight, |
250 | _grey_info.width); | 250 | _grey_info.width); |
@@ -457,7 +457,7 @@ void grey_release(void) | |||
457 | grey_deferred_update() instead. | 457 | grey_deferred_update() instead. |
458 | 458 | ||
459 | Other functions to avoid are: | 459 | Other functions to avoid are: |
460 | lcd_blit() (obviously), lcd_update_rect(), lcd_set_contrast(), | 460 | lcd_blit_mono(), lcd_update_rect(), lcd_set_contrast(), |
461 | lcd_set_invert_display(), lcd_set_flip() */ | 461 | lcd_set_invert_display(), lcd_set_flip() */ |
462 | void grey_show(bool enable) | 462 | void grey_show(bool enable) |
463 | { | 463 | { |
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c index 86a18cde2d..c8245cc1bf 100644 --- a/apps/plugins/mpegplayer/video_out_rockbox.c +++ b/apps/plugins/mpegplayer/video_out_rockbox.c | |||
@@ -104,7 +104,7 @@ static inline void yuv_blit(uint8_t * const * buf, int src_x, int src_y, | |||
104 | video_lock(); | 104 | video_lock(); |
105 | 105 | ||
106 | #ifdef HAVE_LCD_COLOR | 106 | #ifdef HAVE_LCD_COLOR |
107 | rb->lcd_yuv_blit(buf, src_x, src_y, stride, x, y , width, height); | 107 | rb->lcd_blit_yuv(buf, src_x, src_y, stride, x, y , width, height); |
108 | #else | 108 | #else |
109 | grey_ub_gray_bitmap_part(buf[0], src_x, src_y, stride, x, y, width, height); | 109 | grey_ub_gray_bitmap_part(buf[0], src_x, src_y, stride, x, y, width, height); |
110 | #endif | 110 | #endif |
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index e8ceaed7a1..7c86fabdc0 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c | |||
@@ -192,7 +192,7 @@ static void time_main_yuv(void) | |||
192 | time_start = *rb->current_tick; | 192 | time_start = *rb->current_tick; |
193 | while((time_end = *rb->current_tick) - time_start < DURATION) | 193 | while((time_end = *rb->current_tick) - time_start < DURATION) |
194 | { | 194 | { |
195 | rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH, | 195 | rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, |
196 | 0, 0, YUV_WIDTH, YUV_HEIGHT); | 196 | 0, 0, YUV_WIDTH, YUV_HEIGHT); |
197 | frame_count++; | 197 | frame_count++; |
198 | } | 198 | } |
@@ -208,7 +208,7 @@ static void time_main_yuv(void) | |||
208 | time_start = *rb->current_tick; | 208 | time_start = *rb->current_tick; |
209 | while((time_end = *rb->current_tick) - time_start < DURATION) | 209 | while((time_end = *rb->current_tick) - time_start < DURATION) |
210 | { | 210 | { |
211 | rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH, | 211 | rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, |
212 | part14_x, part14_y, part14_w, part14_h); | 212 | part14_x, part14_y, part14_w, part14_h); |
213 | frame_count++; | 213 | frame_count++; |
214 | } | 214 | } |
@@ -260,7 +260,7 @@ static void time_remote_update(void) | |||
260 | } | 260 | } |
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | #if LCD_DEPTH < 4 | 263 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) |
264 | 264 | ||
265 | GREY_INFO_STRUCT_IRAM | 265 | GREY_INFO_STRUCT_IRAM |
266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; | 266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; |
@@ -357,7 +357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
357 | log_text("Main LCD YUV"); | 357 | log_text("Main LCD YUV"); |
358 | time_main_yuv(); | 358 | time_main_yuv(); |
359 | #endif | 359 | #endif |
360 | #if LCD_DEPTH < 4 | 360 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) |
361 | log_text("Greyscale library"); | 361 | log_text("Greyscale library"); |
362 | time_greyscale(); | 362 | time_greyscale(); |
363 | #endif | 363 | #endif |
diff --git a/apps/plugins/video.c b/apps/plugins/video.c index 2799e3d5d1..fa1646d112 100644 --- a/apps/plugins/video.c +++ b/apps/plugins/video.c | |||
@@ -361,13 +361,13 @@ void timer4_isr(void) | |||
361 | height = MIN(LCD_HEIGHT/8-1, height); /* reserve bottom line */ | 361 | height = MIN(LCD_HEIGHT/8-1, height); /* reserve bottom line */ |
362 | if (gPlay.bDirtyOSD) | 362 | if (gPlay.bDirtyOSD) |
363 | { /* OSD to bottom line */ | 363 | { /* OSD to bottom line */ |
364 | rb->lcd_blit(gBuf.pOSD, 0, LCD_HEIGHT/8-1, | 364 | rb->lcd_blit_mono(gBuf.pOSD, 0, LCD_HEIGHT/8-1, |
365 | LCD_WIDTH, 1, LCD_WIDTH); | 365 | LCD_WIDTH, 1, LCD_WIDTH); |
366 | gPlay.bDirtyOSD = false; | 366 | gPlay.bDirtyOSD = false; |
367 | } | 367 | } |
368 | } | 368 | } |
369 | 369 | ||
370 | rb->lcd_blit(gBuf.pReadVideo, 0, 0, | 370 | rb->lcd_blit_mono(gBuf.pReadVideo, 0, 0, |
371 | gFileHdr.video_width, height, gFileHdr.video_width); | 371 | gFileHdr.video_width, height, gFileHdr.video_width); |
372 | 372 | ||
373 | available = Available(gBuf.pReadVideo); | 373 | available = Available(gBuf.pReadVideo); |
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 */ |
diff --git a/uisimulator/common/lcd-common.c b/uisimulator/common/lcd-common.c index bf9cb5c269..51c8215da1 100644 --- a/uisimulator/common/lcd-common.c +++ b/uisimulator/common/lcd-common.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "lcd-sdl.h" | 25 | #include "lcd-sdl.h" |
26 | 26 | ||
27 | void lcd_blit(const fb_data* p_data, int x, int y, int width, int height, | 27 | void lcd_blit_mono(const unsigned char *data, int x, int y, int width, int height, |
28 | int stride) | 28 | int stride) |
29 | { | 29 | { |
30 | (void)p_data; | 30 | (void)p_data; |
31 | (void)x; | 31 | (void)x; |
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index fa3e5d2b0d..bc9e56732f 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c | |||
@@ -193,9 +193,9 @@ void lcd_yuv_set_options(unsigned options) | |||
193 | (void)options; | 193 | (void)options; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* Draw a partial YUV colour bitmap - similiar behavior to lcd_yuv_blit | 196 | /* Draw a partial YUV colour bitmap - similiar behavior to lcd_blit_yuv |
197 | in the core */ | 197 | in the core */ |
198 | void lcd_yuv_blit(unsigned char * const src[3], | 198 | void lcd_blit_yuv(unsigned char * const src[3], |
199 | int src_x, int src_y, int stride, | 199 | int src_x, int src_y, int stride, |
200 | int x, int y, int width, int height) | 200 | int x, int y, int width, int height) |
201 | { | 201 | { |