I am trying tests/pkg_lvgl on esp32-wrover-kit, the test works perfect but the display shows upside-down for me.
Could anyone tell me how can I rotate the display 180 degrees. As far as I remember the lv_port-esp32 has a configuration option for rotating the display but I couldn’t find how to make it.
I haven’t used LVGL that much but If I’m not mistaking your question is related to LVGL API itself and not RIOT, I don’t have a BOARD to test at the moment but could it be related to https://docs.lvgl.io/latest/en/html/porting/display.html#rotation? So either at runtime try lv_disp_set_rotation(disp, rot) or initialization directly on lv_disp_drv_t disp_drv set the rotated parameter.
Thank you very much for your warm welcome and for the kind answer.
I could easily made 180 degrees software rotation by adding “disp_drv.sw_rotate=1;” into “void lvgl_init(screen_dev_t *screen_dev)” function in “RIOT/pkg/lvgl/lvgl.c”, and calling “lv_disp_set_rotation(NULL, LV_DISP_ROT_180) at “int main(void)” in RIOT/tests/pkg_lvgl/main.c”. However memory consumption is 87%, CPU load is 53% with just this test.
I think there should be a more convenient and economical way of turning display upside-down. I am trying to make this rotation inside of display controller (if possible) or in the driver or at least in the initialization but I couldn’t succeed any of them yet I am working…
Thank you for your attention and contribution. This is indeed a much better solution for everybody.
I am on a trip and far from my workshop therefore I can’t try your PR but I guess it’s OK.