diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index c4b300ac94..7a5c1156ff 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -307,14 +307,6 @@ void lcd_init_device(void) | |||
307 | 307 | ||
308 | GPIOD_DIR |= (1<<7); | 308 | GPIOD_DIR |= (1<<7); |
309 | 309 | ||
310 | #if 0 | ||
311 | /* TODO: This code is conditional on a variable in the OF init, we need to | ||
312 | work out what it means */ | ||
313 | |||
314 | GPIOD_PIN(7) = (1<<7); | ||
315 | GPIOD_DIR |= (1<<7); | ||
316 | #endif | ||
317 | |||
318 | lcd_delay(1); | 310 | lcd_delay(1); |
319 | 311 | ||
320 | GPIOA_PIN(5) = (1<<5); | 312 | GPIOA_PIN(5) = (1<<5); |
@@ -377,13 +369,14 @@ void lcd_update(void) | |||
377 | 369 | ||
378 | /* Set start position and window */ | 370 | /* Set start position and window */ |
379 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, | 371 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, |
380 | ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); | 372 | ((y_offset + LCD_WIDTH-1) << 8) | y_offset); |
381 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_WIDTH-1) << 8); | 373 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8); |
382 | lcd_write_reg(R_RAM_ADDR_SET, y_offset); | 374 | lcd_write_reg(R_RAM_ADDR_SET, y_offset); |
383 | 375 | ||
384 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | 376 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); |
385 | 377 | ||
386 | lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); | 378 | lcd_write_data((unsigned short *)lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT); |
379 | |||
387 | } /* lcd_update */ | 380 | } /* lcd_update */ |
388 | 381 | ||
389 | 382 | ||
@@ -414,8 +407,8 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
414 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); | 407 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); |
415 | /* Set start position and window */ | 408 | /* Set start position and window */ |
416 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, | 409 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, |
417 | ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); | 410 | ((y_offset + LCD_WIDTH-1) << 8) | y_offset); |
418 | lcd_write_reg(R_VERT_RAM_ADDR_POS, ((x + width - 1) << 8) | x); | 411 | lcd_write_reg(R_VERT_RAM_ADDR_POS, ((y + height - 1) << 8) | y); |
419 | lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset)); | 412 | lcd_write_reg(R_RAM_ADDR_SET, (x << 8) | (y + y_offset)); |
420 | 413 | ||
421 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | 414 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); |