Index: firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c =================================================================== --- firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c (revision 18913) +++ firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c (working copy) @@ -307,13 +307,9 @@ GPIOD_DIR |= (1<<7); -#if 0 - /* TODO: This code is conditional on a variable in the OF init, we need to - work out what it means */ - + /* This code turns on the button light */ GPIOD_PIN(7) = (1<<7); GPIOD_DIR |= (1<<7); -#endif lcd_delay(1); @@ -377,8 +373,8 @@ /* Set start position and window */ lcd_write_reg(R_HORIZ_RAM_ADDR_POS, - ((y_offset + LCD_HEIGHT-1) << 8) | y_offset); - lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_WIDTH-1) << 8); + ((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_cmd(R_WRITE_DATA_2_GRAM);