Display rotation by software on ESP32 and EK79652 display

Description

What MCU/Processor/Board and compiler are you using?

I’m using ESP32 board with EK79652 display.

What do you want to achieve?

Software rotation of the screen, since because of my display drivers, hardware rotation is not possible.

What have you tried so far?

I’ve tried so many differents ways that I prefer to start all over.

Are you using TFT_ESPI?

No code example makes it really hard to help…

Thanks for answering!

No, I’m not using that (does not know what it is)

The code which I thought would achieve what I’m looking for is this one:

  static lv_disp_draw_buf_t disp_buf1;
static lv_color_t buf1_1[CONFIG_LVGL_HOR_RES_MAX * 400];
lv_disp_draw_buf_init(&disp_buf1, buf1_1, NULL, CONFIG_LVGL_VER_RES_MAX * 100);
static lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.draw_buf = &disp_buf1;
disp_drv.hor_res = CONFIG_LVGL_HOR_RES_MAX;
disp_drv.ver_res = CONFIG_LVGL_VER_RES_MAX;
disp_drv.sw_rotate = 1;
disp_drv.rotated = 2;
lv_disp_t * disp = lv_disp_drv_register(&disp_drv);

		
lv_disp_set_rotation(disp, LV_DISP_ROT_270);

But this doesn’t seem to do anything. Neither I can build it without errors. That is why I said I prefer to just “”“start over”"".

I only want to know what should I implement in my code to rotate the whole screen (and the objects inside of it) 90 degrees. Tell me what you need to know in order to help me and I will answer you with everything.