2017-11-02 11:37 AM
Hi:
I've just got a STM32F469 Discovery. I want to use it in portrait mode but fail. anybody can help me ?
I'm using 'STM32F4cube // projects // STM32469I-Discovery // Demonstrations //Stemwin'
I've try to modify these
1. in LCDConf.c:
#define LCD_SWAP_XY 1 -> 0
#define XSIZE_PHYS 800 -> 480
#define YSIZE_PHYS 480 -> 8002017-11-29 07:50 AM
Hi,
i have the same problem.
Did you find the solution?
BR
Tom
2017-11-29 09:14 AM
,
,
Yes. I have.
in LCDConf.c
♯ define LCD_SWAP_XY 0 , //1
,
♯ define LCD_MIRROR_Y 0 , //1...
♯ define XSIZE_PHYS 480 //800
,
♯ define YSIZE_PHYS 800 //480...
♯ define ZONES , , , , , ,2 //4
...
uint8_t pPage[] , , , ,= {0x00, 0x00, 0x03, 0x1F}, /* , ,0 ->, 799 */
...
...
♯ elif (ZONES == 2 )
,
//{0x00, 0x00, 0x01, 0x8F}, /* 0 ->, 399 */,
//{0x01, 0x90, 0x03, 0x1F},
{0x00, 0x00, 0x00, 0xeF}, /* 0 ->, 239 */,
{0x00, 0xf0, 0x01, 0xdF} /* 240 ->, 479 */OTM8009A_Init(OTM8009A_FORMAT_RBG565, LCD_ORIENTATION_PORTRAIT),
in otm8009a.c
if(orientation == OTM8009A_ORIENTATION_LANDSCAPE)
,
{,
DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData39),,
DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData27),,
DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData28),,
},
else,
{,
DSI_IO_WriteCmd(0, (uint8_t *)ShortRegData39_P),,
DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData27_P),,
DSI_IO_WriteCmd( 4, (uint8_t *)lcdRegData28_P),,
}where
const uint8_t lcdRegData27_P[] = {0x00, 0x00, 0x01, 0xDF, OTM8009A_CMD_CASET},
const uint8_t lcdRegData28_P[] = {0x00, 0x00, 0x03, 0x1F, OTM8009A_CMD_PASET},
const uint8_t ShortRegData39_P[] = {OTM8009A_CMD_MADCTR, OTM8009A_MADCTR_MODE_PORTRAIT},
enjoy.
2017-11-29 09:29 AM
Wow, that was fast.
It works perfect.
Thank You. You are my HERO.:)
Did you changed touchscreen orientation too?
BR
TOM