Error: unknown type name 'lv_disp_drv_t'; did you mean 'lv_fs_drv_t'?

Hello,

I am getting lib/lvgl_esp32_drivers/lvgl_tft/disp_driver.h:59:24: error: unknown type name ‘lv_disp_drv_t’; did you mean ‘lv_fs_drv_t’?, i tried some of the solution found in the forum, unfortunalty none of them wokred, I am using lvgl 9.2.1 and ESP-IDF v5.3.1 with vs code platformio.


Please help. I am not a frimware expert, any help wil be appreciated.

Thanks
Jolly

hi, maybe your problem in library path, check your path to lvgl or your lvgl version

I have checked lvgl version and inlcuded path, everthing looks fine, I didnt find the declaration for “lv_disp_drv_t” in any files in the lvgl folder
#include “src/lv_api_map_v8.h”
#include “src/lv_api_map_v9_0.h”
#include “src/lv_api_map_v9_1.h”
or lv_types.h

please help

hi, on lvgl 9 can not use ‘lv_disp_drv_t’ anymore, you can see here stm32f7 using lvgl 9.

v9 and v8 have many differences in initialization and usage, check and make sure you only use one version in your project.

edit: here they talk about merging or changing lv_disp_drv_t to a new api see

From v9.0.0 changelog:

Display API

  • lv_disp_drv_t and lv_disp_draw_buf_t was removed
  • To create a display and set it up:

lv_display_t * disp = lv_display_create(hor_res, ver_res);
lv_display_set_flush_cb(disp, flush_cb);
lv_display_set_buffers(disp, buf1, buf2, buf_size_in_bytes, mode);