lvgl / lv_port_stm32f769_disco

LVGL ported to STM32F769 Discovery using CubeIDE
https://docs.littlevgl.com/v7/en/html/get-started/stm32.html
MIT License
35 stars 22 forks source link

Initializing the device in portrait mode #14

Open devjeet-adben opened 2 weeks ago

devjeet-adben commented 2 weeks ago

I am using the same stm discovery board and using lvgl 8.3.11. I want to initialize the device in potrait mode but failed to do so. There are lots of setting and no easy way to configure the device is portrait mode.

I tried changing this

//In tft.c
#define VSYNC               OTM8009A_800X480_VSYNC
#define VBP                 OTM8009A_800X480_VBP
#define VFP                 OTM8009A_800X480_VFP
#define VACT                OTM8009A_800X480_HEIGHT
#define HSYNC               OTM8009A_800X480_HSYNC
#define HBP                 OTM8009A_800X480_HBP
#define HFP                 OTM8009A_800X480_HFP
#define HACT                (OTM8009A_800X480_WIDTH / ZONES)

to

#define VSYNC               OTM8009A_480X800_VSYNC
#define VBP                 OTM8009A_480X800_VBP
#define VFP                 OTM8009A_480X800_VFP
#define VACT                OTM8009A_480X800_HEIGHT
#define HSYNC               OTM8009A_480X800_HSYNC
#define HBP                 OTM8009A_480X800_HBP
#define HFP                 OTM8009A_480X800_HFP
#define HACT                (OTM8009A_480X800_WIDTH / ZONES)

From

//In tft.c tft_init()
disp_drv.hor_res = 800;
disp_drv.ver_res = 480;

to

//In tft.c tft_init()
disp_drv.hor_res = 480;
disp_drv.ver_res = 800;

From

//In tft.c LCD_Config()
OTM8009A_Init(OTM8009A_FORMAT_RBG565, LCD_ORIENTATION_LANDSCAPE);

To

OTM8009A_Init(OTM8009A_FORMAT_RBG565, LCD_ORIENTATION_PORTRAIT);

I have also changed few settings in BSP_LCD layer, but unable to use portrait mode.

Can someone help me with this.

Thanks, Regards.

kisvegabor commented 2 weeks ago

I suggest asking around in the forum if someone already did that.