diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-27 23:11:34 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-27 23:11:34 +0100 |
commit | fa82491a0badcb1d6afb46554655deec35a4a9f3 (patch) | |
tree | bedd39c78060e8e8368e8e3a8613eba7c9d0a15d /drivers | |
parent | 8bdfc52efed023b492c47bbfd5976db145074b55 (diff) | |
download | uGFX-fa82491a0badcb1d6afb46554655deec35a4a9f3.tar.gz uGFX-fa82491a0badcb1d6afb46554655deec35a4a9f3.tar.bz2 uGFX-fa82491a0badcb1d6afb46554655deec35a4a9f3.zip |
ILI9320 fix
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gdisp/ILI9320/gdisp_lld.c | 8 | ||||
-rw-r--r-- | drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gdisp/ILI9320/gdisp_lld.c b/drivers/gdisp/ILI9320/gdisp_lld.c index f670966c..5ca5dceb 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld.c +++ b/drivers/gdisp/ILI9320/gdisp_lld.c @@ -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:
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h index e9b808c0..a6d9d631 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h +++ b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h @@ -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);
|