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.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/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 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}; |