summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-12-11 00:30:15 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-12-11 00:30:15 +0000
commit6ddfac0806a15a8771725ec4fdc39247f36949ff (patch)
tree02647b38dacbd1394596ce69b66424f9fe1fa060 /firmware/drivers
parent27cd6ca15243593085341bb4f3c2a4c864d89214 (diff)
downloadrockbox-6ddfac0806a15a8771725ec4fdc39247f36949ff.tar.gz
rockbox-6ddfac0806a15a8771725ec4fdc39247f36949ff.zip
Patch #1377879 by Anders Kagerin - faster lcd_update_rect() for h300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8215 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-h300.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/firmware/drivers/lcd-h300.c b/firmware/drivers/lcd-h300.c
index 17fe1f530b..91a86defd4 100644
--- a/firmware/drivers/lcd-h300.c
+++ b/firmware/drivers/lcd-h300.c
@@ -200,11 +200,19 @@ void lcd_update_rect(int x, int y, int width, int height)
200 if(ymax >= LCD_HEIGHT) 200 if(ymax >= LCD_HEIGHT)
201 ymax = LCD_HEIGHT-1; 201 ymax = LCD_HEIGHT-1;
202 202
203 /* Copy specified rectangle bitmap to hardware */ 203 /* set update window */
204 for (; y <= ymax; y++) 204 lcd_write_reg(0x44, (ymax<<8) | y); /* horiz ram addr */
205 { 205 lcd_write_reg(0x45, ((x+width-1)<<8) | x); /* vert ram addr */
206 lcd_write_reg(0x21, (x << 8) + y); 206 lcd_write_reg(0x21, (x<<8) | y);
207 lcd_begin_write_gram(); 207 lcd_begin_write_gram();
208 lcd_write_data ((unsigned short *)&lcd_framebuffer[y][x], width); 208
209 } 209 /* Copy specified rectangle bitmap to hardware */
210 for (; y <= ymax; y++)
211 {
212 lcd_write_data ((unsigned short *)&lcd_framebuffer[y][x], width);
213 }
214
215 /* reset update window */
216 lcd_write_reg(0x44, 0xaf00); /* horiz ram addr: 0 - 175 */
217 lcd_write_reg(0x45, 0xdb00); /* vert ram addr: 0 - 219 */
210} 218}