forked from len0rd/rockbox
New type for the LCD frame buffer data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7876 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dbc8c2c14c
commit
0cb4a4610d
2 changed files with 17 additions and 11 deletions
|
|
@ -184,17 +184,17 @@ struct plugin_api {
|
|||
void (*lcd_set_background)(int brightness);
|
||||
int (*lcd_get_background)(void);
|
||||
#endif
|
||||
void (*lcd_bitmap_part)(const unsigned char *src, int src_x, int src_y,
|
||||
void (*lcd_bitmap_part)(const fb_data *src, int src_x, int src_y,
|
||||
int stride, int x, int y, int width, int height);
|
||||
void (*lcd_bitmap)(const unsigned char *src, int x, int y, int width,
|
||||
void (*lcd_bitmap)(const fb_data *src, int x, int y, int width,
|
||||
int height);
|
||||
#endif
|
||||
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
|
||||
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);
|
||||
unsigned char* lcd_framebuffer;
|
||||
void (*lcd_blit) (const unsigned char* data, int x, int by, int width,
|
||||
fb_data* lcd_framebuffer;
|
||||
void (*lcd_blit) (const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
void (*lcd_update)(void);
|
||||
void (*lcd_update_rect)(int x, int y, int width, int height);
|
||||
|
|
|
|||
|
|
@ -34,10 +34,16 @@
|
|||
#include "file.h" /* for MAX_PATH; FIXME: Why does this not work for sims? */
|
||||
#endif
|
||||
|
||||
#if LCD_DEPTH <=8
|
||||
typedef unsigned char fb_data;
|
||||
#elif LCD_DEPTH <= 16
|
||||
typedef unsigned short fb_data;
|
||||
#endif
|
||||
|
||||
/* common functions */
|
||||
extern void lcd_write_command(int byte);
|
||||
extern void lcd_write_command_ex(int cmd, int data1, int data2);
|
||||
extern void lcd_write_data(const unsigned char* p_bytes, int count);
|
||||
extern void lcd_write_data(const fb_data* p_bytes, int count);
|
||||
extern void lcd_init(void);
|
||||
#ifdef SIMULATOR
|
||||
/* Define a dummy device specific init for the sims */
|
||||
|
|
@ -63,7 +69,7 @@ extern void lcd_icon(int icon, bool enable);
|
|||
|
||||
#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP)
|
||||
/* performance function */
|
||||
extern void lcd_blit(const unsigned char* data, int x, int by, int width,
|
||||
extern void lcd_blit(const fb_data* data, int x, int by, int width,
|
||||
int bheight, int stride);
|
||||
|
||||
extern void lcd_update(void);
|
||||
|
|
@ -161,11 +167,11 @@ struct rgb {
|
|||
|
||||
/* Memory copy of display bitmap */
|
||||
#if LCD_DEPTH == 1
|
||||
extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
||||
#elif LCD_DEPTH == 2
|
||||
extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
|
||||
#elif LCD_DEPTH == 16
|
||||
extern unsigned char lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH*2];
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
|
||||
#endif
|
||||
|
||||
extern void lcd_set_invert_display(bool yesno);
|
||||
|
|
@ -190,9 +196,9 @@ extern void lcd_hline(int x1, int x2, int y);
|
|||
extern void lcd_vline(int x, int y1, int y2);
|
||||
extern void lcd_drawrect(int x, int y, int width, int height);
|
||||
extern void lcd_fillrect(int x, int y, int width, int height);
|
||||
extern void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
|
||||
extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
|
||||
int stride, int x, int y, int width, int height);
|
||||
extern void lcd_bitmap(const unsigned char *src, int x, int y, int width,
|
||||
extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
|
||||
int height);
|
||||
extern void lcd_putsxy(int x, int y, const unsigned char *string);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue