diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-02-20 19:31:34 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-02-20 19:31:34 +0000 |
commit | 51223e53957943c8b4c142882d2aa86d8025837d (patch) | |
tree | 6348e4c292a2e38f501b6ae3676f76ef26ff21e0 /firmware | |
parent | 283bfb16f1228f581e8a025bba5e2029daa32278 (diff) | |
download | rockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.gz rockbox-51223e53957943c8b4c142882d2aa86d8025837d.zip |
Introduced LCD_FBHEIGHT in addition to the already existing LCD_FBWIDTH to ease framebuffer handling a bit. Added equivalent definitions for the remote LCD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12419 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd-16bit.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-1bit-vert.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-vert.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-h100-remote.c | 8 | ||||
-rw-r--r-- | firmware/drivers/lcd-remote-2bit-vi.c | 2 | ||||
-rw-r--r-- | firmware/export/lcd-remote.h | 17 | ||||
-rw-r--r-- | firmware/export/lcd.h | 27 | ||||
-rw-r--r-- | firmware/target/arm/iriver/ifp7xx/lcd-ifp7xx.c | 6 | ||||
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c | 6 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h100/lcd-h100.c | 6 | ||||
-rw-r--r-- | firmware/target/sh/archos/lcd-archos-bitmap.c | 6 |
12 files changed, 52 insertions, 36 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 16037f149d..d545bf3fe4 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c | |||
@@ -48,7 +48,7 @@ enum fill_opt { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | /*** globals ***/ | 50 | /*** globals ***/ |
51 | fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH] IRAM_LCDFRAMEBUFFER __attribute__ ((aligned (16))); | 51 | fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IRAM_LCDFRAMEBUFFER __attribute__ ((aligned (16))); |
52 | 52 | ||
53 | 53 | ||
54 | static fb_data* lcd_backdrop = NULL; | 54 | static fb_data* lcd_backdrop = NULL; |
@@ -599,7 +599,7 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
599 | dst_end = dst_col + height * LCD_WIDTH; | 599 | dst_end = dst_col + height * LCD_WIDTH; |
600 | do | 600 | do |
601 | { | 601 | { |
602 | switch (drawmode) | 602 | switch (drawmode) |
603 | { | 603 | { |
604 | case DRMODE_SOLID: | 604 | case DRMODE_SOLID: |
605 | if (data & 0x01) | 605 | if (data & 0x01) |
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index 6ae92af72b..62dfab0180 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | /*** globals ***/ | 38 | /*** globals ***/ |
39 | 39 | ||
40 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 40 | unsigned char lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH]; |
41 | 41 | ||
42 | static int drawmode = DRMODE_SOLID; | 42 | static int drawmode = DRMODE_SOLID; |
43 | static int xmargin = 0; | 43 | static int xmargin = 0; |
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index 54357433b9..9ba52e1ba9 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | /*** globals ***/ | 39 | /*** globals ***/ |
40 | 40 | ||
41 | unsigned char lcd_framebuffer[LCD_HEIGHT][LCD_FBWIDTH] IBSS_ATTR; | 41 | unsigned char lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IBSS_ATTR; |
42 | 42 | ||
43 | static const unsigned char pixmask[4] ICONST_ATTR = { | 43 | static const unsigned char pixmask[4] ICONST_ATTR = { |
44 | 0xC0, 0x30, 0x0C, 0x03 | 44 | 0xC0, 0x30, 0x0C, 0x03 |
diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c index ec20068d95..7b3352b9d6 100644 --- a/firmware/drivers/lcd-2bit-vert.c +++ b/firmware/drivers/lcd-2bit-vert.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | /*** globals ***/ | 38 | /*** globals ***/ |
39 | 39 | ||
40 | fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH] IBSS_ATTR; | 40 | fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IBSS_ATTR; |
41 | 41 | ||
42 | const unsigned char lcd_dibits[16] ICONST_ATTR = { | 42 | const unsigned char lcd_dibits[16] ICONST_ATTR = { |
43 | 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F, | 43 | 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F, |
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index e366906724..e8d22213b8 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c | |||
@@ -65,7 +65,7 @@ | |||
65 | 65 | ||
66 | /*** globals ***/ | 66 | /*** globals ***/ |
67 | 67 | ||
68 | fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH] | 68 | fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH] |
69 | IBSS_ATTR; | 69 | IBSS_ATTR; |
70 | 70 | ||
71 | static int drawmode = DRMODE_SOLID; | 71 | static int drawmode = DRMODE_SOLID; |
@@ -629,7 +629,7 @@ void lcd_remote_update(void) | |||
629 | #endif | 629 | #endif |
630 | 630 | ||
631 | /* Copy display bitmap to hardware */ | 631 | /* Copy display bitmap to hardware */ |
632 | for (y = 0; y < LCD_REMOTE_HEIGHT/8; y++) | 632 | for (y = 0; y < LCD_REMOTE_FBHEIGHT; y++) |
633 | { | 633 | { |
634 | lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y); | 634 | lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y); |
635 | lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | ((xoffset >> 4) & 0xf)); | 635 | lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | ((xoffset >> 4) & 0xf)); |
@@ -655,8 +655,8 @@ void lcd_remote_update_rect(int x, int y, int width, int height) | |||
655 | width = LCD_REMOTE_WIDTH - x; | 655 | width = LCD_REMOTE_WIDTH - x; |
656 | if (width <= 0) | 656 | if (width <= 0) |
657 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 657 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
658 | if(ymax >= LCD_REMOTE_HEIGHT/8) | 658 | if(ymax >= LCD_REMOTE_FBHEIGHT) |
659 | ymax = LCD_REMOTE_HEIGHT/8-1; | 659 | ymax = LCD_REMOTE_FBHEIGHT-1; |
660 | 660 | ||
661 | #ifdef HAVE_REMOTE_LCD_TICKING | 661 | #ifdef HAVE_REMOTE_LCD_TICKING |
662 | /* Adjust byte delay for emi reduction */ | 662 | /* Adjust byte delay for emi reduction */ |
diff --git a/firmware/drivers/lcd-remote-2bit-vi.c b/firmware/drivers/lcd-remote-2bit-vi.c index 3c85512bea..74e098010e 100644 --- a/firmware/drivers/lcd-remote-2bit-vi.c +++ b/firmware/drivers/lcd-remote-2bit-vi.c | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | /*** globals ***/ | 40 | /*** globals ***/ |
41 | 41 | ||
42 | fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_FBWIDTH] | 42 | fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH] |
43 | IBSS_ATTR; | 43 | IBSS_ATTR; |
44 | 44 | ||
45 | static const fb_remote_data patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000}; | 45 | static const fb_remote_data patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000}; |
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h index e4fffedac0..7ed52bd188 100644 --- a/firmware/export/lcd-remote.h +++ b/firmware/export/lcd-remote.h | |||
@@ -82,14 +82,25 @@ extern unsigned lcd_remote_color_to_native(unsigned color); | |||
82 | #define LCD_REMOTE_DEFAULT_BG LCD_REMOTE_WHITE | 82 | #define LCD_REMOTE_DEFAULT_BG LCD_REMOTE_WHITE |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | /* Memory copy of display bitmap */ | 85 | /* Frame buffer dimensions (format checks only cover existing targets!) */ |
86 | #if LCD_REMOTE_DEPTH == 1 | 86 | #if LCD_REMOTE_DEPTH == 1 |
87 | extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; | 87 | #define LCD_REMOTE_FBHEIGHT ((LCD_REMOTE_HEIGHT+7)/8) |
88 | #elif LCD_REMOTE_DEPTH == 2 | 88 | #elif LCD_REMOTE_DEPTH == 2 |
89 | #if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED | 89 | #if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED |
90 | extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH]; | 90 | #define LCD_REMOTE_FBHEIGHT ((LCD_REMOTE_HEIGHT+7)/8) |
91 | #endif | 91 | #endif |
92 | #endif /* LCD_REMOTE_DEPTH */ | ||
93 | /* Set defaults if not defined different yet. The defaults apply to both | ||
94 | * dimensions for LCD_REMOTE_DEPTH >= 8 */ | ||
95 | #ifndef LCD_REMOTE_FBWIDTH | ||
96 | #define LCD_REMOTE_FBWIDTH LCD_REMOTE_WIDTH | ||
92 | #endif | 97 | #endif |
98 | #ifndef LCD_REMOTE_FBHEIGHT | ||
99 | #define LCD_REMOTE_FBHEIGHT LCD_REMOTE_HEIGHT | ||
100 | #endif | ||
101 | /* The actual framebuffer */ | ||
102 | extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH]; | ||
103 | |||
93 | 104 | ||
94 | extern void lcd_remote_init(void); | 105 | extern void lcd_remote_init(void); |
95 | extern int lcd_remote_default_contrast(void); | 106 | extern int lcd_remote_default_contrast(void); |
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index fecf3f5426..c4edc478de 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -237,25 +237,30 @@ static inline unsigned lcd_color_to_native(unsigned color) | |||
237 | #define LCD_DEFAULT_BG LCD_WHITE | 237 | #define LCD_DEFAULT_BG LCD_WHITE |
238 | #endif | 238 | #endif |
239 | 239 | ||
240 | /* Memory copy of display bitmap */ | 240 | /* Frame buffer dimensions */ |
241 | #if LCD_DEPTH == 1 | 241 | #if LCD_DEPTH == 1 |
242 | extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 242 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
243 | #define LCD_FBWIDTH ((LCD_WIDTH+7)/8) | ||
244 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */ | ||
245 | #define LCD_FBHEIGHT ((LCD_HEIGHT+7)/8) | ||
246 | #endif | ||
243 | #elif LCD_DEPTH == 2 | 247 | #elif LCD_DEPTH == 2 |
244 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 248 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
245 | #define LCD_FBWIDTH ((LCD_WIDTH+3)/4) | 249 | #define LCD_FBWIDTH ((LCD_WIDTH+3)/4) |
246 | extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_FBWIDTH]; | 250 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */ |
247 | #else | 251 | #define LCD_FBHEIGHT ((LCD_HEIGHT+3)/4) |
248 | extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; | ||
249 | #endif | 252 | #endif |
250 | #elif LCD_DEPTH == 16 | 253 | #endif /* LCD_DEPTH */ |
251 | extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH]; | 254 | /* Set defaults if not defined different yet. The defaults apply to both |
252 | #elif LCD_DEPTH == 18 | 255 | * dimensions for LCD_DEPTH >= 8 */ |
253 | extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH]; | ||
254 | #endif | ||
255 | |||
256 | #ifndef LCD_FBWIDTH | 256 | #ifndef LCD_FBWIDTH |
257 | #define LCD_FBWIDTH LCD_WIDTH | 257 | #define LCD_FBWIDTH LCD_WIDTH |
258 | #endif | 258 | #endif |
259 | #ifndef LCD_FBHEIGHT | ||
260 | #define LCD_FBHEIGHT LCD_HEIGHT | ||
261 | #endif | ||
262 | /* The actual framebuffer */ | ||
263 | extern fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH]; | ||
259 | 264 | ||
260 | /** Port-specific functions. Enable in port config file. **/ | 265 | /** Port-specific functions. Enable in port config file. **/ |
261 | #ifdef HAVE_LCD_ENABLE | 266 | #ifdef HAVE_LCD_ENABLE |
diff --git a/firmware/target/arm/iriver/ifp7xx/lcd-ifp7xx.c b/firmware/target/arm/iriver/ifp7xx/lcd-ifp7xx.c index ca4a01b52e..0aacd8af67 100644 --- a/firmware/target/arm/iriver/ifp7xx/lcd-ifp7xx.c +++ b/firmware/target/arm/iriver/ifp7xx/lcd-ifp7xx.c | |||
@@ -169,7 +169,7 @@ void lcd_update(void) | |||
169 | int y; | 169 | int y; |
170 | 170 | ||
171 | /* Copy display bitmap to hardware */ | 171 | /* Copy display bitmap to hardware */ |
172 | for (y = 0; y < LCD_HEIGHT/8; y++) | 172 | for (y = 0; y < LCD_FBHEIGHT; y++) |
173 | { | 173 | { |
174 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); | 174 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); |
175 | lcd_write_command (LCD_CNTL_HIGHCOL); | 175 | lcd_write_command (LCD_CNTL_HIGHCOL); |
@@ -193,8 +193,8 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
193 | width = LCD_WIDTH - x; | 193 | width = LCD_WIDTH - x; |
194 | if (width <= 0) | 194 | if (width <= 0) |
195 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 195 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
196 | if(ymax >= LCD_HEIGHT/8) | 196 | if(ymax >= LCD_FBHEIGHT) |
197 | ymax = LCD_HEIGHT/8-1; | 197 | ymax = LCD_FBHEIGHT-1; |
198 | 198 | ||
199 | /* Copy specified rectange bitmap to hardware */ | 199 | /* Copy specified rectange bitmap to hardware */ |
200 | for (; y <= ymax; y++) | 200 | for (; y <= ymax; y++) |
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c index 6e3bb01a15..bd1fb19727 100644 --- a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c +++ b/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c | |||
@@ -399,7 +399,7 @@ void lcd_remote_update(void) | |||
399 | { | 399 | { |
400 | int y; | 400 | int y; |
401 | if(remote_initialized) { | 401 | if(remote_initialized) { |
402 | for(y = 0;y < LCD_REMOTE_HEIGHT/8;y++) { | 402 | for(y = 0;y < LCD_REMOTE_FBHEIGHT;y++) { |
403 | /* Copy display bitmap to hardware. | 403 | /* Copy display bitmap to hardware. |
404 | The COM48-COM63 lines are not connected so we have to skip | 404 | The COM48-COM63 lines are not connected so we have to skip |
405 | them. Further, the column address doesn't wrap, so we | 405 | them. Further, the column address doesn't wrap, so we |
@@ -427,8 +427,8 @@ void lcd_remote_update_rect(int x, int y, int width, int height) | |||
427 | width = LCD_REMOTE_WIDTH - x; | 427 | width = LCD_REMOTE_WIDTH - x; |
428 | if (width <= 0) | 428 | if (width <= 0) |
429 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 429 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
430 | if(ymax >= LCD_REMOTE_HEIGHT) | 430 | if(ymax >= LCD_REMOTE_FBHEIGHT) |
431 | ymax = LCD_REMOTE_HEIGHT-1; | 431 | ymax = LCD_REMOTE_FBHEIGHT-1; |
432 | 432 | ||
433 | /* Copy specified rectangle bitmap to hardware | 433 | /* Copy specified rectangle bitmap to hardware |
434 | COM48-COM63 are not connected, so we need to skip those */ | 434 | COM48-COM63 are not connected, so we need to skip those */ |
diff --git a/firmware/target/coldfire/iriver/h100/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c index 8afb23b85c..a721273384 100644 --- a/firmware/target/coldfire/iriver/h100/lcd-h100.c +++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c | |||
@@ -189,7 +189,7 @@ void lcd_update(void) | |||
189 | int y; | 189 | int y; |
190 | 190 | ||
191 | /* Copy display bitmap to hardware */ | 191 | /* Copy display bitmap to hardware */ |
192 | for (y = 0; y < LCD_HEIGHT/4; y++) | 192 | for (y = 0; y < LCD_FBHEIGHT; y++) |
193 | { | 193 | { |
194 | lcd_write_command_ex(LCD_CNTL_PAGE, y, -1); | 194 | lcd_write_command_ex(LCD_CNTL_PAGE, y, -1); |
195 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); | 195 | lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); |
@@ -213,8 +213,8 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
213 | width = LCD_WIDTH - x; | 213 | width = LCD_WIDTH - x; |
214 | if (width <= 0) | 214 | if (width <= 0) |
215 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 215 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
216 | if(ymax >= LCD_HEIGHT/4) | 216 | if(ymax >= LCD_FBHEIGHT) |
217 | ymax = LCD_HEIGHT/4-1; | 217 | ymax = LCD_FBHEIGHT-1; |
218 | 218 | ||
219 | /* Copy specified rectange bitmap to hardware */ | 219 | /* Copy specified rectange bitmap to hardware */ |
220 | for (; y <= ymax; y++) | 220 | for (; y <= ymax; y++) |
diff --git a/firmware/target/sh/archos/lcd-archos-bitmap.c b/firmware/target/sh/archos/lcd-archos-bitmap.c index 8b57099206..b458c81098 100644 --- a/firmware/target/sh/archos/lcd-archos-bitmap.c +++ b/firmware/target/sh/archos/lcd-archos-bitmap.c | |||
@@ -164,7 +164,7 @@ void lcd_update(void) | |||
164 | int y; | 164 | int y; |
165 | 165 | ||
166 | /* Copy display bitmap to hardware */ | 166 | /* Copy display bitmap to hardware */ |
167 | for (y = 0; y < LCD_HEIGHT/8; y++) | 167 | for (y = 0; y < LCD_FBHEIGHT; y++) |
168 | { | 168 | { |
169 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); | 169 | lcd_write_command (LCD_CNTL_PAGE | (y & 0xf)); |
170 | lcd_write_command (LCD_CNTL_HIGHCOL | ((xoffset >> 4) & 0xf)); | 170 | lcd_write_command (LCD_CNTL_HIGHCOL | ((xoffset >> 4) & 0xf)); |
@@ -188,8 +188,8 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
188 | width = LCD_WIDTH - x; | 188 | width = LCD_WIDTH - x; |
189 | if (width <= 0) | 189 | if (width <= 0) |
190 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ | 190 | return; /* nothing left to do, 0 is harmful to lcd_write_data() */ |
191 | if(ymax >= LCD_HEIGHT/8) | 191 | if(ymax >= LCD_FBHEIGHT) |
192 | ymax = LCD_HEIGHT/8-1; | 192 | ymax = LCD_FBHEIGHT-1; |
193 | 193 | ||
194 | /* Copy specified rectange bitmap to hardware */ | 194 | /* Copy specified rectange bitmap to hardware */ |
195 | for (; y <= ymax; y++) | 195 | for (; y <= ymax; y++) |