-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-3248S035C with GT911 touch chip, arduino demo compile error #6214
Comments
you have to copy the demos and the examples folder from ..llibraries/vgl/demos to ..libraries/lvgl/src/demos same for examples |
I did that: And get this error:
|
I just want to include this file as a start: In the arduino code I did this: |
Where |
Have you set // Your code
lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * screenHeight / 6 );
/*初始化显示*/
static lv_disp_drv_t disp_drv;
lv_disp_drv_init( &disp_drv );
/*将以下行更改为显示分辨率*/
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 );
/*初始化(虚拟)输入设备驱动程序*/
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 ); I think the style of your code in this section is probably that of LVGL version 8.. /*LVGL draw into this buffer, 1/10 screen size usually works well. The size is in bytes*/
#define DRAW_BUF_SIZE (TFT_HOR_RES * TFT_VER_RES / 10 * (LV_COLOR_DEPTH / 8))
uint32_t draw_buf[DRAW_BUF_SIZE / 4];
/* LVGL calls it when a rendered image needs to copied to the display*/
void my_disp_flush( lv_display_t *disp, const lv_area_t *area, uint8_t * px_map){
/*For example ("my_..." functions needs to be implemented by you)
uint32_t w = lv_area_get_width(area);
uint32_t h = lv_area_get_height(area);
my_set_window(area->x1, area->y1, w, h);
my_draw_bitmaps(px_map, w * h);
*/
lv_disp_flush_ready(disp); /*Call it to tell LVGL you are ready*/
}
/*Read the touchpad*/
void my_touchpad_read( lv_indev_t * indev, lv_indev_data_t * data ){
/*For example ("my_..." functions needs to be implemented by you)
int32_t x, y;
bool touched = my_get_touch( &x, &y );
if(!touched) {
data->state = LV_INDEV_STATE_RELEASED;
} else {
data->state = LV_INDEV_STATE_PRESSED;
data->point.x = x;
data->point.y = y;
}
*/
}
void lvSystemSetup(){
lv_init();
disp = lv_display_create(TFT_HOR_RES, TFT_VER_RES);
lv_display_set_flush_cb(disp, my_disp_flush);
lv_display_set_buffers(disp, draw_buf, NULL, sizeof(draw_buf), LV_DISPLAY_RENDER_MODE_PARTIAL);
/*Initialize the input device driver*/
lv_indev_t * indev = lv_indev_create();
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER); /*Touchpad should have POINTER type*/
lv_indev_set_read_cb(indev, my_touchpad_read);
} I think this link might be useful. https://docs.lvgl.io/master/integration/framework/arduino.html |
Yes. But when I use the old lvgl that came with the display folder from the seller, I don't get any error. I've tried to troubleshoot the source of the error when using the new lvgl library but it will be a difficult one to solve in a short time since I don't have a general understanding of how the library folder works.
I did that I got this error:
|
In your |
I did and got this list of errors:
This is the code example I'm using: |
Try compiling this again. LVGL_Arduino-3.5CTP-gt911_2.zip |
I had to uncomment these lines:
And add this:
At It compiles but nothing shows on the display. |
Why do you want to add this? #define DRAW_BUF_SIZE (screenWidth * screenHeight / 10 * (LV_COLOR_DEPTH / 8))
uint8_t draw_buf[DRAW_BUF_SIZE / 4];
/*If you need to use 2 display buffer, uncomment this line*/
//uint8_t draw_buf2[DRAW_BUF_SIZE / 4];
//=====================================================================//
// in lvSystemSetup()
/*If you need to use 2 display buffer, uncomment this line*/
//lv_display_set_buffers(disp, draw_buf, draw_buf2, sizeof(DRAW_BUF_SIZE), LV_DISPLAY_RENDER_MODE_PARTIAL); And this is the latest file I updated. Try compiling it. LVGL_Arduino-3.5CTP-gt911_3.zip |
All I want now is to get the display to work. Even TFT_eSPI examples aren't working. So, now I better know what is the display problem and get it to work with TFT_eSPI examples then run lvgl examples. |
I opened a new issue in Bodmer TFT_eSPI library: I'm waiting for the support because nothing shows on the display running any of the library's examples. |
We need some feedback on this issue. Now we mark this as "stale" because there was no activity here for 14 days. Remove the "stale" label or comment else this will be closed in 7 days. |
Anyway, I was able to program the board with:
So I will try to know the related issues on |
LVGL version
v9.1.1
What happened?
I ran an example came in
3.5inch_ESP32-3248S035
folder, I don't remember where I downloaded it. It includeslvgl
andTFT_eSPI
libraries.I updated
lvgl
library and still get this error:In the attachment the example file I used:
LVGL_Arduino-3.5CTP-gt911.zip
How to reproduce?
No response
The text was updated successfully, but these errors were encountered: