diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-11-14 20:43:49 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-11-14 20:43:49 +0000 |
commit | 0cb4a4610ddf1a392e04c8818e89fa188a2e9fad (patch) | |
tree | fa2bd30e53d1cde946e83edf750a0d7158f564a1 /firmware/export/lcd.h | |
parent | dbc8c2c14cc86b6a23b437e3f3145214e173bfa2 (diff) | |
download | rockbox-0cb4a4610ddf1a392e04c8818e89fa188a2e9fad.tar.gz rockbox-0cb4a4610ddf1a392e04c8818e89fa188a2e9fad.zip |
New type for the LCD frame buffer data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7876 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r-- | firmware/export/lcd.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index f095bbffa0..2d04cec054 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -34,10 +34,16 @@ | |||
34 | #include "file.h" /* for MAX_PATH; FIXME: Why does this not work for sims? */ | 34 | #include "file.h" /* for MAX_PATH; FIXME: Why does this not work for sims? */ |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if LCD_DEPTH <=8 | ||
38 | typedef unsigned char fb_data; | ||
39 | #elif LCD_DEPTH <= 16 | ||
40 | typedef unsigned short fb_data; | ||
41 | #endif | ||
42 | |||
37 | /* common functions */ | 43 | /* common functions */ |
38 | extern void lcd_write_command(int byte); | 44 | extern void lcd_write_command(int byte); |
39 | extern void lcd_write_command_ex(int cmd, int data1, int data2); | 45 | extern void lcd_write_command_ex(int cmd, int data1, int data2); |
40 | extern void lcd_write_data(const unsigned char* p_bytes, int count); | 46 | extern void lcd_write_data(const fb_data* p_bytes, int count); |
41 | extern void lcd_init(void); | 47 | extern void lcd_init(void); |
42 | #ifdef SIMULATOR | 48 | #ifdef SIMULATOR |
43 | /* Define a dummy device specific init for the sims */ | 49 | /* Define a dummy device specific init for the sims */ |
@@ -63,7 +69,7 @@ extern void lcd_icon(int icon, bool enable); | |||
63 | 69 | ||
64 | #if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP) | 70 | #if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP) |
65 | /* performance function */ | 71 | /* performance function */ |
66 | extern void lcd_blit(const unsigned char* data, int x, int by, int width, | 72 | extern void lcd_blit(const fb_data* data, int x, int by, int width, |
67 | int bheight, int stride); | 73 | int bheight, int stride); |
68 | 74 | ||
69 | extern void lcd_update(void); | 75 | extern void lcd_update(void); |
@@ -161,11 +167,11 @@ struct rgb { | |||
161 | 167 | ||
162 | /* Memory copy of display bitmap */ | 168 | /* Memory copy of display bitmap */ |
163 | #if LCD_DEPTH == 1 | 169 | #if LCD_DEPTH == 1 |
164 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 170 | extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
165 | #elif LCD_DEPTH == 2 | 171 | #elif LCD_DEPTH == 2 |
166 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; | 172 | extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; |
167 | #elif LCD_DEPTH == 16 | 173 | #elif LCD_DEPTH == 16 |
168 | extern unsigned char lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH*2]; | 174 | extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH]; |
169 | #endif | 175 | #endif |
170 | 176 | ||
171 | extern void lcd_set_invert_display(bool yesno); | 177 | extern void lcd_set_invert_display(bool yesno); |
@@ -190,9 +196,9 @@ extern void lcd_hline(int x1, int x2, int y); | |||
190 | extern void lcd_vline(int x, int y1, int y2); | 196 | extern void lcd_vline(int x, int y1, int y2); |
191 | extern void lcd_drawrect(int x, int y, int width, int height); | 197 | extern void lcd_drawrect(int x, int y, int width, int height); |
192 | extern void lcd_fillrect(int x, int y, int width, int height); | 198 | extern void lcd_fillrect(int x, int y, int width, int height); |
193 | extern void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y, | 199 | extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, |
194 | int stride, int x, int y, int width, int height); | 200 | int stride, int x, int y, int width, int height); |
195 | extern void lcd_bitmap(const unsigned char *src, int x, int y, int width, | 201 | extern void lcd_bitmap(const fb_data *src, int x, int y, int width, |
196 | int height); | 202 | int height); |
197 | extern void lcd_putsxy(int x, int y, const unsigned char *string); | 203 | extern void lcd_putsxy(int x, int y, const unsigned char *string); |
198 | 204 | ||