ILI9320 fix

ugfx_release_2.6
Joel Bodenmann 2012-11-27 23:11:34 +01:00
parent 8bdfc52efe
commit fa82491a0b
2 changed files with 5 additions and 6 deletions

View File

@ -244,10 +244,10 @@ static void lld_lcdSetCursor(uint16_t x, uint16_t y) {
static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) {
switch(GDISP.Orientation) {
case GDISP_ROTATE_0:
lld_lcdWriteReg(0x0050, x - 1);
lld_lcdWriteReg(0x0051, x + cx - 2);
lld_lcdWriteReg(0x0052, y - 1);
lld_lcdWriteReg(0x0053, y + cy - 2);
lld_lcdWriteReg(0x0050, x);
lld_lcdWriteReg(0x0051, x + cx - 1);
lld_lcdWriteReg(0x0052, y);
lld_lcdWriteReg(0x0053, y + cy - 1);
break;
case GDISP_ROTATE_90:

View File

@ -44,8 +44,7 @@ static __inline void GDISP_LLD(init_board)(void) {
palSetPadMode(GPIOE, GPIOE_TFT_RST, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, GPIOD_TFT_LIGHT, PAL_MODE_OUTPUT_PUSHPULL);
/* const unsigned char FSMC_Bank = 0; */
const unsigned char FSMC_Bank = 6;
const unsigned char FSMC_Bank = 0;
/* FSMC timing */
FSMC_Bank1->BTCR[FSMC_Bank+1] = (6) | (10 << 8) | (10 << 16);