From 4e79f8edc7be26f5548e004766ac1572d47a2419 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 16 Dec 2008 02:50:39 +0000 Subject: Commit updated FS#9569 by Michael Chicoine. Fixes a bug in lcd_update_rect on the e200v2. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19453 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index f157b552e4..98ed8421f6 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c @@ -369,10 +369,10 @@ void lcd_update(void) lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); /* Set start position and window */ - lcd_write_reg(R_HORIZ_RAM_ADDR_POS, - ((y_offset + LCD_WIDTH-1) << 8) | y_offset); - lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8); - lcd_write_reg(R_RAM_ADDR_SET, y_offset); + lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (LCD_WIDTH-1) << 8); + lcd_write_reg(R_VERT_RAM_ADDR_POS, + ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); + lcd_write_reg(R_RAM_ADDR_SET, (y_offset) << 8); lcd_write_cmd(R_WRITE_DATA_2_GRAM); @@ -408,9 +408,10 @@ void lcd_update_rect(int x, int y, int width, int height) lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); /* Set start position and window */ lcd_write_reg(R_HORIZ_RAM_ADDR_POS, - ((y_offset + LCD_WIDTH-1) << 8) | y_offset); - lcd_write_reg(R_VERT_RAM_ADDR_POS, ((y + height - 1) << 8) | y); - lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset)); + ((x + width-1) << 8) | x); + lcd_write_reg(R_VERT_RAM_ADDR_POS, + ((y_offset + y + height - 1) << 8) | (y_offset + y)); + lcd_write_reg(R_RAM_ADDR_SET, ((y + y_offset) << 8) | x); lcd_write_cmd(R_WRITE_DATA_2_GRAM); -- cgit v1.2.3