Consistent naming scheme the various blit functions. * Removed lcd_blit_mono() for colour targets. Plugin API became incompatible, so sort, clean up & bump. * Implemented lcd_blit_mono() for M3.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16775 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
99c0978faa
commit
68a21689ae
31 changed files with 272 additions and 405 deletions
130
apps/plugin.c
130
apps/plugin.c
|
@ -74,6 +74,7 @@ static const struct plugin_api rockbox_api = {
|
|||
/* lcd */
|
||||
lcd_set_contrast,
|
||||
lcd_update,
|
||||
lcd_update_rect,
|
||||
lcd_clear_display,
|
||||
lcd_setmargins,
|
||||
lcd_getstringsize,
|
||||
|
@ -91,6 +92,7 @@ static const struct plugin_api rockbox_api = {
|
|||
lcd_icon,
|
||||
lcd_double_height,
|
||||
#else
|
||||
&lcd_framebuffer[0][0],
|
||||
lcd_set_drawmode,
|
||||
lcd_get_drawmode,
|
||||
lcd_setfont,
|
||||
|
@ -115,21 +117,27 @@ static const struct plugin_api rockbox_api = {
|
|||
#if LCD_DEPTH == 16
|
||||
lcd_bitmap_transparent_part,
|
||||
lcd_bitmap_transparent,
|
||||
lcd_blit_yuv,
|
||||
#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
|
||||
|| defined (IRIVER_H10)
|
||||
lcd_yuv_set_options,
|
||||
#endif
|
||||
#elif (LCD_DEPTH < 4) || !defined(SIMULATOR)
|
||||
lcd_blit_mono,
|
||||
lcd_blit_grey_phase,
|
||||
#endif /* LCD_DEPTH */
|
||||
lcd_puts_style,
|
||||
lcd_puts_scroll_style,
|
||||
bidi_l2v,
|
||||
font_get_bits,
|
||||
font_load,
|
||||
lcd_puts_style,
|
||||
lcd_puts_scroll_style,
|
||||
&lcd_framebuffer[0][0],
|
||||
lcd_blit,
|
||||
lcd_update_rect,
|
||||
gui_scrollbar_draw,
|
||||
font_get,
|
||||
font_getstringsize,
|
||||
font_get_width,
|
||||
screen_clear_area,
|
||||
gui_scrollbar_draw,
|
||||
#endif
|
||||
|
||||
backlight_on,
|
||||
backlight_off,
|
||||
backlight_set_timeout,
|
||||
|
@ -137,6 +145,7 @@ static const struct plugin_api rockbox_api = {
|
|||
backlight_set_timeout_plugged,
|
||||
#endif
|
||||
gui_syncsplash,
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
/* remote lcd */
|
||||
lcd_remote_set_contrast,
|
||||
|
@ -166,7 +175,11 @@ static const struct plugin_api rockbox_api = {
|
|||
|
||||
remote_backlight_on,
|
||||
remote_backlight_off,
|
||||
remote_backlight_set_timeout,
|
||||
#if CONFIG_CHARGING
|
||||
remote_backlight_set_timeout_plugged,
|
||||
#endif
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
#if NB_SCREENS == 2
|
||||
{&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]},
|
||||
#else
|
||||
|
@ -181,16 +194,6 @@ static const struct plugin_api rockbox_api = {
|
|||
lcd_remote_bitmap,
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR)
|
||||
lcd_grey_phase_blit,
|
||||
#endif
|
||||
#if defined(HAVE_LCD_COLOR)
|
||||
lcd_yuv_blit,
|
||||
#endif
|
||||
#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
|
||||
|| defined (IRIVER_H10)
|
||||
lcd_yuv_set_options,
|
||||
#endif
|
||||
/* list */
|
||||
gui_synclist_init,
|
||||
gui_synclist_set_nb_items,
|
||||
|
@ -233,9 +236,11 @@ static const struct plugin_api rockbox_api = {
|
|||
ata_sleep,
|
||||
ata_disk_is_active,
|
||||
#endif
|
||||
ata_spin,
|
||||
ata_spindown,
|
||||
reload_directory,
|
||||
create_numbered_filename,
|
||||
file_exists,
|
||||
|
||||
/* dir */
|
||||
opendir,
|
||||
|
@ -243,6 +248,7 @@ static const struct plugin_api rockbox_api = {
|
|||
readdir,
|
||||
mkdir,
|
||||
rmdir,
|
||||
dir_exists,
|
||||
|
||||
/* kernel/ system */
|
||||
PREFIX(sleep),
|
||||
|
@ -256,6 +262,14 @@ static const struct plugin_api rockbox_api = {
|
|||
threads,
|
||||
create_thread,
|
||||
remove_thread,
|
||||
thread_wait,
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
mutex_init,
|
||||
mutex_lock,
|
||||
mutex_unlock,
|
||||
align_buffer,
|
||||
#endif
|
||||
|
||||
reset_poweroff_timer,
|
||||
#ifndef SIMULATOR
|
||||
system_memory_guard,
|
||||
|
@ -267,7 +281,15 @@ static const struct plugin_api rockbox_api = {
|
|||
#else
|
||||
cpu_boost,
|
||||
#endif
|
||||
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
|
||||
#endif /* !SIMULATOR */
|
||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||
trigger_cpu_boost,
|
||||
cancel_cpu_boost,
|
||||
#endif
|
||||
#ifdef CACHE_FUNCTIONS_AS_CALL
|
||||
flush_icache,
|
||||
invalidate_icache,
|
||||
#endif
|
||||
timer_register,
|
||||
timer_unregister,
|
||||
|
@ -277,6 +299,13 @@ static const struct plugin_api rockbox_api = {
|
|||
queue_delete,
|
||||
queue_post,
|
||||
queue_wait_w_tmo,
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
queue_enable_queue_send,
|
||||
queue_empty,
|
||||
queue_wait,
|
||||
queue_send,
|
||||
queue_reply,
|
||||
#endif
|
||||
usb_acknowledge,
|
||||
#ifdef RB_PROFILE
|
||||
profile_thread,
|
||||
|
@ -325,13 +354,12 @@ static const struct plugin_api rockbox_api = {
|
|||
utf8seek,
|
||||
|
||||
/* sound */
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
sound_default,
|
||||
#endif
|
||||
sound_set,
|
||||
|
||||
sound_default,
|
||||
sound_min,
|
||||
sound_max,
|
||||
sound_unit,
|
||||
sound_val2phys,
|
||||
#ifndef SIMULATOR
|
||||
mp3_play_data,
|
||||
mp3_play_pause,
|
||||
|
@ -353,6 +381,8 @@ static const struct plugin_api rockbox_api = {
|
|||
pcm_play_pause,
|
||||
pcm_get_bytes_waiting,
|
||||
pcm_calculate_peaks,
|
||||
pcm_play_lock,
|
||||
pcm_play_unlock,
|
||||
#ifdef HAVE_RECORDING
|
||||
&rec_freq_sampr[0],
|
||||
pcm_init_recording,
|
||||
|
@ -367,6 +397,11 @@ static const struct plugin_api rockbox_api = {
|
|||
audio_set_output_source,
|
||||
audio_set_input_source,
|
||||
#endif
|
||||
dsp_set_crossfeed,
|
||||
dsp_set_eq,
|
||||
dsp_dither_enable,
|
||||
dsp_configure,
|
||||
dsp_process,
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
/* playback control */
|
||||
|
@ -508,35 +543,6 @@ static const struct plugin_api rockbox_api = {
|
|||
detect_flashed_romimage,
|
||||
#endif
|
||||
led,
|
||||
#ifdef CACHE_FUNCTIONS_AS_CALL
|
||||
flush_icache,
|
||||
invalidate_icache,
|
||||
#endif
|
||||
/* new stuff at the end, sort into place next time
|
||||
the API gets incompatible */
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
mutex_init,
|
||||
mutex_lock,
|
||||
mutex_unlock,
|
||||
#endif
|
||||
|
||||
thread_wait,
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
align_buffer,
|
||||
#endif
|
||||
|
||||
file_exists,
|
||||
dir_exists,
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
remote_backlight_set_timeout,
|
||||
#if CONFIG_CHARGING
|
||||
remote_backlight_set_timeout_plugged,
|
||||
#endif
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
bufopen,
|
||||
bufalloc,
|
||||
|
@ -569,29 +575,9 @@ static const struct plugin_api rockbox_api = {
|
|||
search_albumart_files,
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
pcm_play_lock,
|
||||
pcm_play_unlock,
|
||||
queue_enable_queue_send,
|
||||
queue_empty,
|
||||
queue_wait,
|
||||
queue_send,
|
||||
queue_reply,
|
||||
#ifndef HAVE_FLASH_STORAGE
|
||||
ata_spin,
|
||||
#endif
|
||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||
trigger_cpu_boost,
|
||||
cancel_cpu_boost,
|
||||
#endif
|
||||
sound_unit,
|
||||
sound_val2phys,
|
||||
dsp_set_crossfeed,
|
||||
dsp_set_eq,
|
||||
dsp_dither_enable,
|
||||
dsp_configure,
|
||||
dsp_process,
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
/* new stuff at the end, sort into place next time
|
||||
the API gets incompatible */
|
||||
|
||||
};
|
||||
|
||||
int plugin_load(const char* plugin, void* parameter)
|
||||
|
|
170
apps/plugin.h
170
apps/plugin.h
|
@ -119,12 +119,12 @@
|
|||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define PLUGIN_API_VERSION 99
|
||||
#define PLUGIN_API_VERSION 100
|
||||
|
||||
/* update this to latest version if a change to the api struct breaks
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
new function which are "waiting" at the end of the function table) */
|
||||
#define PLUGIN_MIN_API_VERSION 98
|
||||
#define PLUGIN_MIN_API_VERSION 100
|
||||
|
||||
/* plugin return codes */
|
||||
enum plugin_status {
|
||||
|
@ -144,6 +144,7 @@ struct plugin_api {
|
|||
/* lcd */
|
||||
void (*lcd_set_contrast)(int x);
|
||||
void (*lcd_update)(void);
|
||||
void (*lcd_update_rect)(int x, int y, int width, int height);
|
||||
void (*lcd_clear_display)(void);
|
||||
void (*lcd_setmargins)(int x, int y);
|
||||
int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
|
||||
|
@ -160,7 +161,8 @@ struct plugin_api {
|
|||
void (*lcd_remove_cursor)(void);
|
||||
void (*lcd_icon)(int icon, bool enable);
|
||||
void (*lcd_double_height)(bool on);
|
||||
#else
|
||||
#else /* HAVE_LCD_BITMAP */
|
||||
fb_data* lcd_framebuffer;
|
||||
void (*lcd_set_drawmode)(int mode);
|
||||
int (*lcd_get_drawmode)(void);
|
||||
void (*lcd_setfont)(int font);
|
||||
|
@ -192,28 +194,40 @@ struct plugin_api {
|
|||
int x, int y, int width, int height);
|
||||
void (*lcd_bitmap_transparent)(const fb_data *src, int x, int y,
|
||||
int width, int height);
|
||||
void (*lcd_blit_yuv)(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height);
|
||||
#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
|
||||
|| defined (IRIVER_H10)
|
||||
void (*lcd_yuv_set_options)(unsigned options);
|
||||
#endif
|
||||
unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation );
|
||||
const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code );
|
||||
struct font* (*font_load)(const char *path);
|
||||
#elif (LCD_DEPTH < 4) || !defined(SIMULATOR)
|
||||
void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases,
|
||||
int bx, int by, int bwidth, int bheight,
|
||||
int stride);
|
||||
#endif /* LCD_DEPTH */
|
||||
void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style);
|
||||
void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string,
|
||||
int style);
|
||||
fb_data* lcd_framebuffer;
|
||||
void (*lcd_blit) (const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
void (*lcd_update_rect)(int x, int y, int width, int height);
|
||||
void (*gui_scrollbar_draw)(struct screen * screen, int x, int y,
|
||||
int width, int height, int items,
|
||||
int min_shown, int max_shown,
|
||||
unsigned flags);
|
||||
|
||||
unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation );
|
||||
const unsigned char *(*font_get_bits)( struct font *pf, unsigned short char_code );
|
||||
struct font* (*font_load)(const char *path);
|
||||
struct font* (*font_get)(int font);
|
||||
int (*font_getstringsize)(const unsigned char *str, int *w, int *h,
|
||||
int fontnumber);
|
||||
int (*font_get_width)(struct font* pf, unsigned short char_code);
|
||||
void (*screen_clear_area)(struct screen * display, int xstart, int ystart,
|
||||
int width, int height);
|
||||
#endif
|
||||
void (*gui_scrollbar_draw)(struct screen * screen, int x, int y,
|
||||
int width, int height, int items,
|
||||
int min_shown, int max_shown,
|
||||
unsigned flags);
|
||||
#endif /* HAVE_LCD_BITMAP */
|
||||
|
||||
/* backlight */
|
||||
void (*backlight_on)(void);
|
||||
void (*backlight_off)(void);
|
||||
void (*backlight_set_timeout)(int index);
|
||||
|
@ -255,7 +269,11 @@ struct plugin_api {
|
|||
|
||||
void (*remote_backlight_on)(void);
|
||||
void (*remote_backlight_off)(void);
|
||||
void (*remote_backlight_set_timeout)(int index);
|
||||
#if CONFIG_CHARGING
|
||||
void (*remote_backlight_set_timeout_plugged)(int index);
|
||||
#endif
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
struct screen* screens[NB_SCREENS];
|
||||
#if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
|
||||
void (*lcd_remote_set_foreground)(unsigned foreground);
|
||||
|
@ -267,22 +285,6 @@ struct plugin_api {
|
|||
void (*lcd_remote_bitmap)(const fb_remote_data *src, int x, int y, int width,
|
||||
int height);
|
||||
#endif
|
||||
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && !defined(SIMULATOR)
|
||||
void (*lcd_grey_phase_blit)(unsigned char *values, unsigned char *phases,
|
||||
int bx, int by, int bwidth, int bheight,
|
||||
int stride);
|
||||
#endif
|
||||
#if defined(HAVE_LCD_COLOR)
|
||||
void (*lcd_yuv_blit)(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height);
|
||||
#endif
|
||||
|
||||
#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
|
||||
|| defined (IRIVER_H10)
|
||||
void (*lcd_yuv_set_options)(unsigned options);
|
||||
#endif
|
||||
|
||||
/* list */
|
||||
void (*gui_synclist_init)(struct gui_synclist * lists,
|
||||
list_get_name callback_get_item_name,void * data,
|
||||
|
@ -329,11 +331,14 @@ struct plugin_api {
|
|||
void (*ata_sleep)(void);
|
||||
bool (*ata_disk_is_active)(void);
|
||||
#endif
|
||||
void (*ata_spin)(void);
|
||||
void (*ata_spindown)(int seconds);
|
||||
void (*reload_directory)(void);
|
||||
char *(*create_numbered_filename)(char *buffer, const char *path,
|
||||
const char *prefix, const char *suffix,
|
||||
int numberlen IF_CNFN_NUM_(, int *num));
|
||||
bool (*file_exists)(const char *file);
|
||||
|
||||
|
||||
/* dir */
|
||||
DIR* (*opendir)(const char* name);
|
||||
|
@ -341,6 +346,7 @@ struct plugin_api {
|
|||
struct dirent* (*readdir)(DIR* dir);
|
||||
int (*mkdir)(const char *name);
|
||||
int (*rmdir)(const char *name);
|
||||
bool (*dir_exists)(const char *path);
|
||||
|
||||
/* kernel/ system */
|
||||
void (*PREFIX(sleep))(int ticks);
|
||||
|
@ -358,6 +364,14 @@ struct plugin_api {
|
|||
IF_PRIO(, int priority)
|
||||
IF_COP(, unsigned int core));
|
||||
void (*remove_thread)(struct thread_entry *thread);
|
||||
void (*thread_wait)(struct thread_entry *thread);
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void (*mutex_init)(struct mutex *m);
|
||||
void (*mutex_lock)(struct mutex *m);
|
||||
void (*mutex_unlock)(struct mutex *m);
|
||||
size_t (*align_buffer)(void **start, size_t size, size_t align);
|
||||
#endif
|
||||
|
||||
void (*reset_poweroff_timer)(void);
|
||||
#ifndef SIMULATOR
|
||||
int (*system_memory_guard)(int newmode);
|
||||
|
@ -368,7 +382,15 @@ struct plugin_api {
|
|||
#else
|
||||
void (*cpu_boost)(bool on_off);
|
||||
#endif
|
||||
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
|
||||
#endif /* !SIMULATOR */
|
||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||
void (*trigger_cpu_boost)(void);
|
||||
void (*cancel_cpu_boost)(void);
|
||||
#endif
|
||||
#ifdef CACHE_FUNCTIONS_AS_CALL
|
||||
void (*flush_icache)(void);
|
||||
void (*invalidate_icache)(void);
|
||||
#endif
|
||||
bool (*timer_register)(int reg_prio, void (*unregister_callback)(void),
|
||||
long cycles, int int_prio,
|
||||
|
@ -381,6 +403,16 @@ struct plugin_api {
|
|||
void (*queue_post)(struct event_queue *q, long id, intptr_t data);
|
||||
void (*queue_wait_w_tmo)(struct event_queue *q, struct queue_event *ev,
|
||||
int ticks);
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void (*queue_enable_queue_send)(struct event_queue *q,
|
||||
struct queue_sender_list *send);
|
||||
bool (*queue_empty)(const struct event_queue *q);
|
||||
void (*queue_wait)(struct event_queue *q, struct queue_event *ev);
|
||||
intptr_t (*queue_send)(struct event_queue *q, long id,
|
||||
intptr_t data);
|
||||
void (*queue_reply)(struct event_queue *q, intptr_t retval);
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
void (*usb_acknowledge)(long id);
|
||||
#ifdef RB_PROFILE
|
||||
void (*profile_thread)(void);
|
||||
|
@ -430,12 +462,12 @@ struct plugin_api {
|
|||
int (*utf8seek)(const unsigned char* utf8, int offset);
|
||||
|
||||
/* sound */
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
int (*sound_default)(int setting);
|
||||
#endif
|
||||
void (*sound_set)(int setting, int value);
|
||||
int (*sound_default)(int setting);
|
||||
int (*sound_min)(int setting);
|
||||
int (*sound_max)(int setting);
|
||||
const char * (*sound_unit)(int setting);
|
||||
int (*sound_val2phys)(int setting, int value);
|
||||
#ifndef SIMULATOR
|
||||
void (*mp3_play_data)(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size));
|
||||
void (*mp3_play_pause)(bool play);
|
||||
|
@ -458,6 +490,8 @@ struct plugin_api {
|
|||
void (*pcm_play_pause)(bool play);
|
||||
size_t (*pcm_get_bytes_waiting)(void);
|
||||
void (*pcm_calculate_peaks)(int *left, int *right);
|
||||
void (*pcm_play_lock)(void);
|
||||
void (*pcm_play_unlock)(void);
|
||||
#ifdef HAVE_RECORDING
|
||||
const unsigned long *rec_freq_sampr;
|
||||
void (*pcm_init_recording)(void);
|
||||
|
@ -473,6 +507,13 @@ struct plugin_api {
|
|||
void (*audio_set_output_source)(int monitor);
|
||||
void (*audio_set_input_source)(int source, unsigned flags);
|
||||
#endif
|
||||
void (*dsp_set_crossfeed)(bool enable);
|
||||
void (*dsp_set_eq)(bool enable);
|
||||
void (*dsp_dither_enable)(bool enable);
|
||||
intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting,
|
||||
intptr_t value);
|
||||
int (*dsp_process)(struct dsp_config *dsp, char *dest,
|
||||
const char *src[], int count);
|
||||
#endif /* CONFIG_CODEC == SWCODC */
|
||||
|
||||
/* playback control */
|
||||
|
@ -638,37 +679,8 @@ struct plugin_api {
|
|||
|
||||
void (*led)(bool on);
|
||||
|
||||
#ifdef CACHE_FUNCTIONS_AS_CALL
|
||||
void (*flush_icache)(void);
|
||||
void (*invalidate_icache)(void);
|
||||
#endif
|
||||
|
||||
/* new stuff at the end, sort into place next time
|
||||
the API gets incompatible */
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
void (*mutex_init)(struct mutex *m);
|
||||
void (*mutex_lock)(struct mutex *m);
|
||||
void (*mutex_unlock)(struct mutex *m);
|
||||
#endif
|
||||
|
||||
void (*thread_wait)(struct thread_entry *thread);
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
size_t (*align_buffer)(void **start, size_t size, size_t align);
|
||||
#endif
|
||||
|
||||
bool (*file_exists)(const char *file);
|
||||
bool (*dir_exists)(const char *path);
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
void (*remote_backlight_set_timeout)(int index);
|
||||
#if CONFIG_CHARGING
|
||||
void (*remote_backlight_set_timeout_plugged)(int index);
|
||||
#endif
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
/* buffering API */
|
||||
int (*bufopen)(const char *file, size_t offset, enum data_type type);
|
||||
int (*bufalloc)(const void *src, size_t size, enum data_type type);
|
||||
bool (*bufclose)(int handle_id);
|
||||
|
@ -704,33 +716,9 @@ struct plugin_api {
|
|||
char *buf, int buflen);
|
||||
#endif
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void (*pcm_play_lock)(void);
|
||||
void (*pcm_play_unlock)(void);
|
||||
void (*queue_enable_queue_send)(struct event_queue *q,
|
||||
struct queue_sender_list *send);
|
||||
bool (*queue_empty)(const struct event_queue *q);
|
||||
void (*queue_wait)(struct event_queue *q, struct queue_event *ev);
|
||||
intptr_t (*queue_send)(struct event_queue *q, long id,
|
||||
intptr_t data);
|
||||
void (*queue_reply)(struct event_queue *q, intptr_t retval);
|
||||
#ifndef HAVE_FLASH_STORAGE
|
||||
void (*ata_spin)(void);
|
||||
#endif
|
||||
#ifdef HAVE_SCHEDULER_BOOSTCTRL
|
||||
void (*trigger_cpu_boost)(void);
|
||||
void (*cancel_cpu_boost)(void);
|
||||
#endif
|
||||
const char * (*sound_unit)(int setting);
|
||||
int (*sound_val2phys)(int setting, int value);
|
||||
void (*dsp_set_crossfeed)(bool enable);
|
||||
void (*dsp_set_eq)(bool enable);
|
||||
void (*dsp_dither_enable)(bool enable);
|
||||
intptr_t (*dsp_configure)(struct dsp_config *dsp, int setting,
|
||||
intptr_t value);
|
||||
int (*dsp_process)(struct dsp_config *dsp, char *dest,
|
||||
const char *src[], int count);
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
/* new stuff at the end, sort into place next time
|
||||
the API gets incompatible */
|
||||
|
||||
};
|
||||
|
||||
/* plugin header */
|
||||
|
|
|
@ -1178,11 +1178,12 @@ static void chip8_update_display(void)
|
|||
}
|
||||
#if defined(SIMULATOR) || (LCD_DEPTH > 1)
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID);
|
||||
rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT);
|
||||
rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH,
|
||||
CHIP8_HEIGHT);
|
||||
rb->lcd_update();
|
||||
#else
|
||||
rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3
|
||||
, CHIP8_LCDWIDTH);
|
||||
rb->lcd_blit_mono(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH,
|
||||
CHIP8_HEIGHT>>3, CHIP8_LCDWIDTH);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -239,12 +239,12 @@ static unsigned long _grey_get_pixel(int x, int y)
|
|||
static void _timer_isr(void)
|
||||
{
|
||||
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
||||
_grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases,
|
||||
_grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases,
|
||||
_grey_info.bx, _grey_info.y,
|
||||
_grey_info.bwidth, _grey_info.height,
|
||||
_grey_info.width);
|
||||
#else
|
||||
_grey_info.rb->lcd_grey_phase_blit(_grey_info.values, _grey_info.phases,
|
||||
_grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases,
|
||||
_grey_info.x, _grey_info.by,
|
||||
_grey_info.width, _grey_info.bheight,
|
||||
_grey_info.width);
|
||||
|
@ -457,7 +457,7 @@ void grey_release(void)
|
|||
grey_deferred_update() instead.
|
||||
|
||||
Other functions to avoid are:
|
||||
lcd_blit() (obviously), lcd_update_rect(), lcd_set_contrast(),
|
||||
lcd_blit_mono(), lcd_update_rect(), lcd_set_contrast(),
|
||||
lcd_set_invert_display(), lcd_set_flip() */
|
||||
void grey_show(bool enable)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@ static inline void yuv_blit(uint8_t * const * buf, int src_x, int src_y,
|
|||
video_lock();
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
rb->lcd_yuv_blit(buf, src_x, src_y, stride, x, y , width, height);
|
||||
rb->lcd_blit_yuv(buf, src_x, src_y, stride, x, y , width, height);
|
||||
#else
|
||||
grey_ub_gray_bitmap_part(buf[0], src_x, src_y, stride, x, y, width, height);
|
||||
#endif
|
||||
|
|
|
@ -192,7 +192,7 @@ static void time_main_yuv(void)
|
|||
time_start = *rb->current_tick;
|
||||
while((time_end = *rb->current_tick) - time_start < DURATION)
|
||||
{
|
||||
rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH,
|
||||
rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH,
|
||||
0, 0, YUV_WIDTH, YUV_HEIGHT);
|
||||
frame_count++;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ static void time_main_yuv(void)
|
|||
time_start = *rb->current_tick;
|
||||
while((time_end = *rb->current_tick) - time_start < DURATION)
|
||||
{
|
||||
rb->lcd_yuv_blit(yuvbuf, 0, 0, YUV_WIDTH,
|
||||
rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH,
|
||||
part14_x, part14_y, part14_w, part14_h);
|
||||
frame_count++;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ static void time_remote_update(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if LCD_DEPTH < 4
|
||||
#if (LCD_DEPTH < 4) && !defined(IAUDIO_M3)
|
||||
|
||||
GREY_INFO_STRUCT_IRAM
|
||||
static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH];
|
||||
|
@ -357,7 +357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
log_text("Main LCD YUV");
|
||||
time_main_yuv();
|
||||
#endif
|
||||
#if LCD_DEPTH < 4
|
||||
#if (LCD_DEPTH < 4) && !defined(IAUDIO_M3)
|
||||
log_text("Greyscale library");
|
||||
time_greyscale();
|
||||
#endif
|
||||
|
|
|
@ -361,13 +361,13 @@ void timer4_isr(void)
|
|||
height = MIN(LCD_HEIGHT/8-1, height); /* reserve bottom line */
|
||||
if (gPlay.bDirtyOSD)
|
||||
{ /* OSD to bottom line */
|
||||
rb->lcd_blit(gBuf.pOSD, 0, LCD_HEIGHT/8-1,
|
||||
rb->lcd_blit_mono(gBuf.pOSD, 0, LCD_HEIGHT/8-1,
|
||||
LCD_WIDTH, 1, LCD_WIDTH);
|
||||
gPlay.bDirtyOSD = false;
|
||||
}
|
||||
}
|
||||
|
||||
rb->lcd_blit(gBuf.pReadVideo, 0, 0,
|
||||
rb->lcd_blit_mono(gBuf.pReadVideo, 0, 0,
|
||||
gFileHdr.video_width, height, gFileHdr.video_width);
|
||||
|
||||
available = Available(gBuf.pReadVideo);
|
||||
|
|
|
@ -134,21 +134,21 @@ extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
||||
/* performance function */
|
||||
#if defined(HAVE_LCD_COLOR)
|
||||
#define LCD_YUV_DITHER 0x1
|
||||
extern void lcd_yuv_set_options(unsigned options);
|
||||
extern void lcd_yuv_blit(unsigned char * const src[3],
|
||||
extern void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height);
|
||||
#else
|
||||
extern void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
extern void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int bx, int by, int bwidth, int bheight,
|
||||
int stride);
|
||||
#endif
|
||||
|
||||
/* performance function */
|
||||
extern void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
|
||||
/* update a fraction of the screen */
|
||||
extern void lcd_update_rect(int x, int y, int width, int height);
|
||||
|
|
|
@ -174,7 +174,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
|
|||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
/* For the Gigabeat - show it rotated */
|
||||
/* So the LCD_WIDTH is now the height */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
@ -235,18 +235,6 @@ void lcd_set_invert_display(bool yesno) {
|
|||
// TODO:
|
||||
}
|
||||
|
||||
void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
{
|
||||
(void) data;
|
||||
(void) bx;
|
||||
(void) y;
|
||||
(void) bwidth;
|
||||
(void) height;
|
||||
(void) stride;
|
||||
//TODO:
|
||||
}
|
||||
|
||||
void lcd_set_flip(bool yesno) {
|
||||
(void) yesno;
|
||||
// TODO:
|
||||
|
|
|
@ -109,20 +109,6 @@ void lcd_init_device(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
#define CSUB_X 2
|
||||
#define CSUB_Y 2
|
||||
|
||||
|
@ -155,7 +141,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
|
|||
#define MAX_6BIT 0x3f
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -277,8 +277,8 @@ void lcd_mono_data(const unsigned char *data, int count);
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that x, bwidtht and stride are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
{
|
||||
while (height--)
|
||||
{
|
||||
|
@ -295,7 +295,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that bx and bwidth are in 8-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int bx, int y, int bwidth, int height, int stride)
|
||||
{
|
||||
while (height--)
|
||||
|
|
|
@ -247,20 +247,6 @@ void lcd_init_device(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
/* Update a fraction of the display. */
|
||||
void lcd_update_rect(int x, int y, int width, int height)
|
||||
{
|
||||
|
@ -319,7 +305,7 @@ extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
|
|||
int stride);
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -381,20 +381,6 @@ void lcd_sleep(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
|
@ -411,7 +397,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
|
|||
int y_screen);
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -112,20 +112,6 @@ void lcd_init_device(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
#define CSUB_X 2
|
||||
#define CSUB_Y 2
|
||||
|
||||
|
@ -141,7 +127,7 @@ void lcd_blit(const fb_data* data, int x, int by, int width,
|
|||
#define ROUNDOFFSG (63*257)
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -118,8 +118,8 @@ void lcd_set_flip(bool yesno)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
|
@ -132,7 +132,7 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_grey_phase_blit() */
|
||||
|
|
|
@ -145,8 +145,8 @@ void lcd_init_device(void)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* Copy display bitmap to hardware */
|
||||
while (bheight--)
|
||||
|
@ -161,6 +161,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
|
|||
}
|
||||
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
(void)values;
|
||||
(void)phases;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
/* Update the display.
|
||||
This must be called after all other LCD functions that change the display. */
|
||||
void lcd_update(void) ICODE_ATTR;
|
||||
|
|
|
@ -350,7 +350,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
|
|||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
/* For the Gigabeat - show it rotated */
|
||||
/* So the LCD_WIDTH is now the height */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
@ -411,18 +411,6 @@ void lcd_set_invert_display(bool yesno) {
|
|||
// TODO:
|
||||
}
|
||||
|
||||
void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
{
|
||||
(void) data;
|
||||
(void) bx;
|
||||
(void) y;
|
||||
(void) bwidth;
|
||||
(void) height;
|
||||
(void) stride;
|
||||
//TODO:
|
||||
}
|
||||
|
||||
void lcd_set_flip(bool yesno) {
|
||||
(void) yesno;
|
||||
// TODO:
|
||||
|
|
|
@ -195,20 +195,6 @@ void lcd_set_flip(bool yesno)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
|
@ -224,7 +210,7 @@ extern void lcd_write_yuv420_lines_odither(unsigned char const * const src[3],
|
|||
int x_screen, /* To align dither pattern */
|
||||
int y_screen);
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -612,18 +612,6 @@ void lcd_set_flip(bool yesno)
|
|||
|
||||
/* Blitting functions */
|
||||
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
|
@ -643,7 +631,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
|
|||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
/* For the e200 - show it rotated */
|
||||
/* So the LCD_WIDTH is now the height */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -51,22 +51,8 @@ void lcd_init_device(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -190,8 +190,8 @@ void lcd_init_device(void)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* Copy display bitmap to hardware */
|
||||
while (bheight--)
|
||||
|
@ -206,6 +206,20 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
|
|||
}
|
||||
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
(void)values;
|
||||
(void)phases;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
/* Update the display.
|
||||
This must be called after all other LCD functions that change the display. */
|
||||
void lcd_update(void) ICODE_ATTR;
|
||||
|
|
|
@ -370,18 +370,6 @@ void lcd_set_invert_display(bool yesno)
|
|||
(void)yesno;
|
||||
}
|
||||
|
||||
void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
{
|
||||
// TODO
|
||||
(void)data;
|
||||
(void)bx;
|
||||
(void)y;
|
||||
(void)bwidth;
|
||||
(void)height;
|
||||
(void)stride;
|
||||
}
|
||||
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
|
@ -400,7 +388,7 @@ extern void lcd_write_yuv420_lines_odither(fb_data *dst,
|
|||
int y_screen);
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
|
|||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
/* For the Gigabeat - show it rotated */
|
||||
/* So the LCD_WIDTH is now the height */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
@ -210,18 +210,6 @@ void lcd_set_invert_display(bool yesno) {
|
|||
// TODO:
|
||||
}
|
||||
|
||||
void lcd_blit(const fb_data* data, int bx, int y, int bwidth,
|
||||
int height, int stride)
|
||||
{
|
||||
(void) data;
|
||||
(void) bx;
|
||||
(void) y;
|
||||
(void) bwidth;
|
||||
(void) height;
|
||||
(void) stride;
|
||||
//TODO:
|
||||
}
|
||||
|
||||
void lcd_set_flip(bool yesno) {
|
||||
(void) yesno;
|
||||
// TODO:
|
||||
|
|
|
@ -289,6 +289,35 @@ void lcd_write_data(const fb_data *p_words, int count)
|
|||
CS_HI;
|
||||
}
|
||||
|
||||
static void lcd_mono_data(const unsigned char *p_words, int count)
|
||||
{
|
||||
unsigned data;
|
||||
const unsigned char *p_bytes = p_words;
|
||||
const unsigned char *p_end = p_words + count;
|
||||
|
||||
RS_HI;
|
||||
CS_LO;
|
||||
if (cpu_frequency < 50000000)
|
||||
{
|
||||
while (p_bytes < p_end)
|
||||
{
|
||||
data = *p_bytes++;
|
||||
_write_fast(data);
|
||||
_write_fast(data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (p_bytes < p_end)
|
||||
{
|
||||
data = *p_bytes++;
|
||||
_write_byte(data);
|
||||
_write_byte(data);
|
||||
}
|
||||
}
|
||||
CS_HI;
|
||||
}
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return DEFAULT_CONTRAST_SETTING;
|
||||
|
@ -341,7 +370,7 @@ void lcd_on(void)
|
|||
lcd_write_command_e(LCD_SET_GRAY | 6, 0xcc);
|
||||
lcd_write_command_e(LCD_SET_GRAY | 7, 0x0c);
|
||||
|
||||
lcd_write_command(LCD_SET_PWM_FRC | 6); /* 4FRC + 12PWM */
|
||||
lcd_write_command(LCD_SET_PWM_FRC | 6); /* 3FRC + 12PWM */
|
||||
|
||||
lcd_write_command(LCD_DISPLAY_ON | 1); /* display on */
|
||||
|
||||
|
@ -428,24 +457,31 @@ void lcd_init_device(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* TODO: implement blit functions */
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const fb_data *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
if (initialized)
|
||||
{
|
||||
/* COM48-COM63 are not connected, so we need to skip those */
|
||||
while (bheight--)
|
||||
{
|
||||
lcd_write_command(LCD_SET_PAGE | ((by > 5 ? by + 2 : by) & 0xf));
|
||||
lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf);
|
||||
|
||||
lcd_mono_data(data, width);
|
||||
data += stride;
|
||||
by++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: implement grey blit function */
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
(void)values;
|
||||
|
@ -463,7 +499,8 @@ void lcd_update(void) ICODE_ATTR;
|
|||
void lcd_update(void)
|
||||
{
|
||||
int y;
|
||||
if(initialized) {
|
||||
if (initialized)
|
||||
{
|
||||
for(y = 0;y < LCD_FBHEIGHT;y++) {
|
||||
/* Copy display bitmap to hardware.
|
||||
The COM48-COM63 lines are not connected so we have to skip
|
||||
|
@ -480,7 +517,8 @@ void lcd_update(void)
|
|||
void lcd_update_rect(int, int, int, int) ICODE_ATTR;
|
||||
void lcd_update_rect(int x, int y, int width, int height)
|
||||
{
|
||||
if(initialized) {
|
||||
if (initialized)
|
||||
{
|
||||
int ymax;
|
||||
|
||||
/* The Y coordinates have to work on even 8 pixel rows */
|
||||
|
|
|
@ -131,8 +131,8 @@ void lcd_init_device(void)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
const unsigned char *src, *src_end;
|
||||
unsigned char *dst_u, *dst_l;
|
||||
|
@ -176,7 +176,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
stride <<= 2; /* 4 pixels per block */
|
||||
|
|
|
@ -407,21 +407,6 @@ void lcd_sleep(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
/*if(display_on)*/
|
||||
}
|
||||
|
||||
/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420.
|
||||
* y should have two lines of Y back to back, 2nd line first.
|
||||
* 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,
|
|||
* src_x, src_y, width and height should be even and within the LCD's
|
||||
* boundaries.
|
||||
*/
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -140,8 +140,8 @@ void lcd_init_device(void)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
const unsigned char *src, *src_end;
|
||||
unsigned char *dst_u, *dst_l;
|
||||
|
@ -185,7 +185,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 4-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
stride <<= 2; /* 4 pixels per block */
|
||||
|
|
|
@ -294,21 +294,6 @@ bool lcd_enabled(void)
|
|||
|
||||
/*** update functions ***/
|
||||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* TODO: Implement lcd_blit() */
|
||||
(void)data;
|
||||
(void)x;
|
||||
(void)by;
|
||||
(void)width;
|
||||
(void)bheight;
|
||||
(void)stride;
|
||||
/*if(display_on)*/
|
||||
}
|
||||
|
||||
/* Line write helper function for lcd_yuv_blit. Write two lines of yuv420.
|
||||
* y should have two lines of Y back to back, 2nd line first.
|
||||
* 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,
|
|||
* src_x, src_y, width and height should be even
|
||||
* x, y, width and height have to be within LCD bounds
|
||||
*/
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
|
@ -140,8 +140,8 @@ void lcd_init_device(void)
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
|
||||
int bheight, int stride)
|
||||
{
|
||||
/* Copy display bitmap to hardware */
|
||||
while (bheight--)
|
||||
|
@ -160,7 +160,7 @@ void lcd_grey_data(unsigned char *values, unsigned char *phases, int count);
|
|||
|
||||
/* Performance function that works with an external buffer
|
||||
note that by and bheight are in 8-pixel units! */
|
||||
void lcd_grey_phase_blit(unsigned char *values, unsigned char *phases,
|
||||
void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
|
||||
int x, int by, int width, int bheight, int stride)
|
||||
{
|
||||
stride <<= 3; /* 8 pixels per block */
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include "lcd.h"
|
||||
#include "lcd-sdl.h"
|
||||
|
||||
void lcd_blit(const fb_data* p_data, int x, int y, int width, int height,
|
||||
int stride)
|
||||
void lcd_blit_mono(const unsigned char *data, int x, int y, int width, int height,
|
||||
int stride)
|
||||
{
|
||||
(void)p_data;
|
||||
(void)x;
|
||||
|
|
|
@ -193,9 +193,9 @@ void lcd_yuv_set_options(unsigned options)
|
|||
(void)options;
|
||||
}
|
||||
|
||||
/* Draw a partial YUV colour bitmap - similiar behavior to lcd_yuv_blit
|
||||
/* Draw a partial YUV colour bitmap - similiar behavior to lcd_blit_yuv
|
||||
in the core */
|
||||
void lcd_yuv_blit(unsigned char * const src[3],
|
||||
void lcd_blit_yuv(unsigned char * const src[3],
|
||||
int src_x, int src_y, int stride,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue