lvgl: lv_disp_draw_buf_t' does not name a type
Hi everybody This error is reported many times since 2021 over the net and seems to be related to the LVGL versions over 8.0, but i didn’t find a clear solution. i’ve tried with 7.8.1 but have the same error. I’m new to LVGL and simply want to try the lvgl widgets arduino demo . the setup uses thoses snippets:
/* Change to your screen resolution */
static uint32_t screenWidth;
static uint32_t screenHeight;
static lv_disp_draw_buf_t draw_buf;
static lv_color_t *disp_draw_buf;
static lv_disp_drv_t disp_drv;
/* Initialize the display */
lv_disp_drv_init(&disp_drv);
/* Change the following line to your display resolution */
disp_drv.hor_res = screenWidth;
disp_drv.ver_res = screenHeight;
disp_drv.flush_cb = my_disp_flush;
disp_drv.draw_buf = &draw_buf;
lv_disp_drv_register(&disp_drv);
/* Initialize the (dummy) input device driver */
static lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = my_touchpad_read;
lv_indev_drv_register(&indev_drv);
Where can i find a LVGL version that fit with those snippets?
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (11 by maintainers)
Thank you for sharing it! I think most of these points are also mentioned here. Or is there something missing?
Have you tried with LVGL v9 as well?
Hi everyone, after a long time of reading I was able to solve all the I was able to fix all the bugs and run an example. Here are the problems I had.
Microcontroller: Esp32 c3 super mini screen: GC9A01A
Error #1: Verify that the project is in the correct path, I don’t know if this has to do with any error but better to avoid: C:\Users\you\Documents\Arduino\My_Project.
Error #2: File “lv_conf.h” not created: solution: copy, paste and rename the file:
C:\Users\you\Documents\Arduino\libraries\lvgl\lv_conf_template.
In the path: C:\Users\you\Documents\Arduino\libraries\lv_conf.h.
Modify some lines of code:
/* clang-format off */ #if 1 /*Set it to “1” to enable content */
/Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)/ #define LV_COLOR_DEPTH 16 //My display is 16 bit
Error #3: lv_disp_draw_buf_t. solution: change LVGL version to v8.3.
Error #4: …/…/lv_conf.h: No such file or directory. solution: Read well the error path, locate the file and modify:
Example error in path:
c:\users\you\documents\arduino\libraries\lvgl\src\lv_conf_internal.h.
Invoke the file “lv_conf.h” from the current file, keeping in mind how many folders upwards are found in each case:
Example: #include “…/…/lv_conf.h”.
It will not only be in a single file, do it the necessary times until the error stops that are necessary until the error stops coming out.
I use the Arduino_GFX_Library and the lvgl example called hello world.
Well, the built-in examples are compatible with LVGL itself. That’s why they are built in.
However if you are using Arduino be sure to:
Several people already confirmed that it works so I think it’s really working. If you still have some fortitude, please give it an other try. 🤞
I understand that it’ raises some questions so let me summarize the implications briefly. Only 2 things will change:
So if you are happy with SquareLine, you have no reason to stop using it.
Was:
Became:
Version 8
Error:
About six months I thought to study LVGL and kept putting off this idea, but as I began to understand, then there were only mistakes and incomprehensible things. I will use the Bodmer libraries and MCUFRIEND_kbv. Goodbye LVGL…
You can either install LVGL v8.3.x from Arduino’s library manager
or download it from the
release/v8.3
branch from GitHub.