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/drivers | |
| parent | 283bfb16f1228f581e8a025bba5e2029daa32278 (diff) | |
| download | rockbox-51223e53957943c8b4c142882d2aa86d8025837d.zip rockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.gz rockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.bz2 rockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.xz | |
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/drivers')
| -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 |
6 files changed, 10 insertions, 10 deletions
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c index 16037f1..d545bf3 100644 --- a/firmware/drivers/lcd-16bit.c +++ b/firmware/drivers/lcd-16bit.c @@ -48,7 +48,7 @@ enum fill_opt { }; /*** globals ***/ -fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH] IRAM_LCDFRAMEBUFFER __attribute__ ((aligned (16))); +fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IRAM_LCDFRAMEBUFFER __attribute__ ((aligned (16))); 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, dst_end = dst_col + height * LCD_WIDTH; do { - switch (drawmode) + switch (drawmode) { case DRMODE_SOLID: if (data & 0x01) diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index 6ae92af..62dfab0 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c @@ -37,7 +37,7 @@ /*** globals ***/ -unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; +unsigned char lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH]; static int drawmode = DRMODE_SOLID; static int xmargin = 0; diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index 5435743..9ba52e1 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c @@ -38,7 +38,7 @@ /*** globals ***/ -unsigned char lcd_framebuffer[LCD_HEIGHT][LCD_FBWIDTH] IBSS_ATTR; +unsigned char lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IBSS_ATTR; static const unsigned char pixmask[4] ICONST_ATTR = { 0xC0, 0x30, 0x0C, 0x03 diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c index ec20068..7b3352b 100644 --- a/firmware/drivers/lcd-2bit-vert.c +++ b/firmware/drivers/lcd-2bit-vert.c @@ -37,7 +37,7 @@ /*** globals ***/ -fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH] IBSS_ATTR; +fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH] IBSS_ATTR; const unsigned char lcd_dibits[16] ICONST_ATTR = { 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 e366906..e8d2221 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -65,7 +65,7 @@ /*** globals ***/ -fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH] +fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH] IBSS_ATTR; static int drawmode = DRMODE_SOLID; @@ -629,7 +629,7 @@ void lcd_remote_update(void) #endif /* Copy display bitmap to hardware */ - for (y = 0; y < LCD_REMOTE_HEIGHT/8; y++) + for (y = 0; y < LCD_REMOTE_FBHEIGHT; y++) { lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y); 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) width = LCD_REMOTE_WIDTH - x; if (width <= 0) return; /* nothing left to do, 0 is harmful to lcd_write_data() */ - if(ymax >= LCD_REMOTE_HEIGHT/8) - ymax = LCD_REMOTE_HEIGHT/8-1; + if(ymax >= LCD_REMOTE_FBHEIGHT) + ymax = LCD_REMOTE_FBHEIGHT-1; #ifdef HAVE_REMOTE_LCD_TICKING /* 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 3c85512..74e0980 100644 --- a/firmware/drivers/lcd-remote-2bit-vi.c +++ b/firmware/drivers/lcd-remote-2bit-vi.c @@ -39,7 +39,7 @@ /*** globals ***/ -fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_FBWIDTH] +fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH] IBSS_ATTR; static const fb_remote_data patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000}; |