I’ll add to this issue since I have the same problem. I am exporting a sample display just to make sure all is working. Since I am using the WT32-SCO1 Plus (8-bit parallel display), I changed the library from TFT_eSPI to lovyanGFX. I also followed the sample code from ThatProject (their Speedometer example, found here)–I set the includes in proper order, and I added my pinout descriptions. I got that example code from ThatProject to compile without issues once, then I started getting some error about changing LV_COLOR_DEPTH out of nowhere (separate issue).
I am using Arduino IDE 2.0.3 on Windows 11. Here are the library versions:
- lvgl 8.3.4
- lovyanGFX 1.1.2
In an attempt to troubleshoot, I removed the ESP32 board files as well as the lvgl, TFT_eSPI, and lovyanGFX libraries, then reinstalled all but the TFT_eSPI library. The lv_conf.h file is in my …/Arduino/libraries folder (where the lvgl folder; the project file is in the …/Arduino folder), and I set #if 0 to #if 1.
Here is the full error output (after all the est32s3 gcc stuff):
In file included from C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:6:
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:14:27: error: unknown type name 'lv_obj_t'
void _ui_bar_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:20:29: error: unknown type name 'lv_obj_t'
void _ui_basic_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:23:32: error: unknown type name 'lv_obj_t'
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:26:29: error: unknown type name 'lv_obj_t'
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:26:56: error: unknown type name 'uint8_t'
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:29:29: error: unknown type name 'lv_obj_t'
void _ui_label_set_property(lv_obj_t * target, int id, char * val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:33:30: error: unknown type name 'lv_obj_t'
void _ui_roller_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:37:30: error: unknown type name 'lv_obj_t'
void _ui_slider_set_property(lv_obj_t * target, int id, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:39:24: error: unknown type name 'lv_obj_t'
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:39:43: error: unknown type name 'lv_scr_load_anim_t'
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay);
^~~~~~~~~~~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:41:24: error: unknown type name 'lv_obj_t'
void _ui_arc_increment(lv_obj_t * target, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:43:24: error: unknown type name 'lv_obj_t'
void _ui_bar_increment(lv_obj_t * target, int val, int anm);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:45:27: error: unknown type name 'lv_obj_t'
void _ui_slider_increment(lv_obj_t * target, int val, int anm);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:47:30: error: unknown type name 'lv_obj_t'
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:47:51: error: unknown type name 'lv_obj_t'
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:52:22: error: unknown type name 'lv_obj_t'
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:52:41: error: unknown type name 'int32_t'
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:57:23: error: unknown type name 'lv_obj_t'
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:57:42: error: unknown type name 'int32_t'
void _ui_state_modify(lv_obj_t * target, int32_t state, int value);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:59:22: error: unknown type name 'lv_obj_t'
void _ui_opacity_set(lv_obj_t * target, int val);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:61:30: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:61:45: error: unknown type name 'int32_t'
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:63:30: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:63:45: error: unknown type name 'int32_t'
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:65:34: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:65:49: error: unknown type name 'int32_t'
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:67:35: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:67:50: error: unknown type name 'int32_t'
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:69:36: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:69:51: error: unknown type name 'int32_t'
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:71:39: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:71:54: error: unknown type name 'int32_t'
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:73:40: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:73:55: error: unknown type name 'int32_t'
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:75:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:75:33: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_x(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:77:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:77:33: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_y(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:79:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:79:37: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_width(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:81:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:81:38: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_height(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:83:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:83:39: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:85:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:85:42: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:87:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:87:43: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a);
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:89:29: error: unknown type name 'lv_obj_t'
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:89:45: error: unknown type name 'lv_obj_t'
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:91:32: error: unknown type name 'lv_obj_t'
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:91:48: error: unknown type name 'lv_obj_t'
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:93:33: error: unknown type name 'lv_obj_t'
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.h:93:49: error: unknown type name 'lv_obj_t'
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off);
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:8:27: error: unknown type name 'lv_obj_t'
void _ui_bar_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:14:29: error: unknown type name 'lv_obj_t'
void _ui_basic_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:23:32: error: unknown type name 'lv_obj_t'
void _ui_dropdown_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:28:29: error: unknown type name 'lv_obj_t'
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:28:56: error: unknown type name 'uint8_t'
void _ui_image_set_property(lv_obj_t * target, int id, uint8_t * val)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:33:29: error: unknown type name 'lv_obj_t'
void _ui_label_set_property(lv_obj_t * target, int id, char * val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:39:30: error: unknown type name 'lv_obj_t'
void _ui_roller_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:45:30: error: unknown type name 'lv_obj_t'
void _ui_slider_set_property(lv_obj_t * target, int id, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:52:24: error: unknown type name 'lv_obj_t'
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:52:43: error: unknown type name 'lv_scr_load_anim_t'
void _ui_screen_change(lv_obj_t * target, lv_scr_load_anim_t fademode, int spd, int delay)
^~~~~~~~~~~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:57:24: error: unknown type name 'lv_obj_t'
void _ui_arc_increment(lv_obj_t * target, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:64:24: error: unknown type name 'lv_obj_t'
void _ui_bar_increment(lv_obj_t * target, int val, int anm)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:70:27: error: unknown type name 'lv_obj_t'
void _ui_slider_increment(lv_obj_t * target, int val, int anm)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:77:30: error: unknown type name 'lv_obj_t'
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:77:51: error: unknown type name 'lv_obj_t'
void _ui_keyboard_set_target(lv_obj_t * keyboard, lv_obj_t * textarea)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:82:22: error: unknown type name 'lv_obj_t'
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:82:41: error: unknown type name 'int32_t'
void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:91:23: error: unknown type name 'lv_obj_t'
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:91:42: error: unknown type name 'int32_t'
void _ui_state_modify(lv_obj_t * target, int32_t state, int value)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:101:22: error: unknown type name 'lv_obj_t'
void _ui_opacity_set(lv_obj_t * target, int val)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:106:30: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:106:45: error: unknown type name 'int32_t'
void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:111:30: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:111:45: error: unknown type name 'int32_t'
void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:116:34: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:116:49: error: unknown type name 'int32_t'
void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:121:35: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:121:50: error: unknown type name 'int32_t'
void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:126:36: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:126:51: error: unknown type name 'int32_t'
void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:131:39: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:131:54: error: unknown type name 'int32_t'
void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:136:40: error: unknown type name 'lv_anim_t'
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:136:55: error: unknown type name 'int32_t'
void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:142:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:142:33: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_x(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:147:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:147:33: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_y(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:152:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:152:37: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_width(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:157:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:157:38: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_height(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:162:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:162:39: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_opacity(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:167:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:167:42: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:172:1: error: unknown type name 'int32_t'
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
^~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:172:43: error: unknown type name 'lv_anim_t'
int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a)
^~~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:177:29: error: unknown type name 'lv_obj_t'
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:177:45: error: unknown type name 'lv_obj_t'
void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:184:32: error: unknown type name 'lv_obj_t'
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:184:48: error: unknown type name 'lv_obj_t'
void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * prefix, char * postfix)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:190:33: error: unknown type name 'lv_obj_t'
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off)
^~~~~~~~
C:\Users\coled\OneDrive\Documents\Arduino\beer-tap-info\ui_helpers.c:190:49: error: unknown type name 'lv_obj_t'
void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, char * txt_on, char * txt_off)
^~~~~~~~
Using library LovyanGFX at version 1.1.2 in folder: C:\Users\coled\OneDrive\Documents\Arduino\libraries\LovyanGFX
Using library lvgl at version 8.3.4 in folder: C:\Users\coled\OneDrive\Documents\Arduino\libraries\lvgl
Using library SPI at version 2.0.0 in folder: C:\Users\coled\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\SPI
Using library Wire at version 2.0.0 in folder: C:\Users\coled\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\Wire
Here is the code:
#define LGFX_USE_V1
#include <LovyanGFX.hpp>
#include <lvgl.h>
#include "ui.h"
//#include <TFT_eSPI.h>
/*If you want to use the LVGL examples,
make sure to install the lv_examples Arduino library
and uncomment the following line.
#include <lv_examples.h>
*/
class LGFX : public lgfx::LGFX_Device {
lgfx::Panel_ST7796 _panel_instance;
lgfx::Bus_Parallel8 _bus_instance;
lgfx::Light_PWM _light_instance;
lgfx::Touch_FT5x06 _touch_instance;
public:
LGFX(void) {
{
auto cfg = _bus_instance.config();
cfg.freq_write = 40000000;
cfg.pin_wr = 47;
cfg.pin_rd = -1;
cfg.pin_rs = 0;
cfg.pin_d0 = 9;
cfg.pin_d1 = 46;
cfg.pin_d2 = 3;
cfg.pin_d3 = 8;
cfg.pin_d4 = 18;
cfg.pin_d5 = 17;
cfg.pin_d6 = 16;
cfg.pin_d7 = 15;
_bus_instance.config(cfg);
_panel_instance.setBus(&_bus_instance);
}
{
auto cfg = _panel_instance.config();
cfg.pin_cs = -1;
cfg.pin_rst = 4;
cfg.pin_busy = -1;
cfg.memory_width = 320;
cfg.memory_height = 480;
cfg.panel_width = 320;
cfg.panel_height = 480;
cfg.offset_x = 0;
cfg.offset_y = 0;
cfg.offset_rotation = 0;
cfg.dummy_read_pixel = 8;
cfg.dummy_read_bits = 1;
cfg.readable = true;
cfg.invert = true;
cfg.rgb_order = false;
cfg.dlen_16bit = false;
cfg.bus_shared = true;
_panel_instance.config(cfg);
}
{
auto cfg = _light_instance.config();
cfg.pin_bl = 45;
cfg.invert = false;
cfg.freq = 44100;
cfg.pwm_channel = 7;
_light_instance.config(cfg);
_panel_instance.setLight(&_light_instance);
}
{
auto cfg = _touch_instance.config();
cfg.i2c_port = 1;
cfg.i2c_addr = 0x38;
cfg.pin_sda = 6;
cfg.pin_scl = 5;
cfg.freq = 400000;
cfg.x_min = 0;
cfg.x_max = 320;
cfg.y_min = 0;
cfg.y_max = 480;
_touch_instance.config(cfg);
_panel_instance.setTouch(&_touch_instance);
}
setPanel(&_panel_instance);
}
};
static LGFX tft; /* TFT instance */
/*Change to your screen resolution*/
static const uint32_t screenWidth = 480;
static const uint32_t screenHeight = 320;
static lv_disp_draw_buf_t draw_buf;
static lv_color_t buf[ screenWidth * screenHeight / 10 ];
#if LV_USE_LOG != 0
/* Serial debugging */
void my_print(const char * buf)
{
Serial.printf(buf);
Serial.flush();
}
#endif
/* Display flushing */
void my_disp_flush( lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p )
{
uint32_t w = ( area->x2 - area->x1 + 1 );
uint32_t h = ( area->y2 - area->y1 + 1 );
tft.startWrite();
tft.setAddrWindow( area->x1, area->y1, w, h );
tft.pushColors( ( uint16_t * )&color_p->full, w * h, true );
tft.endWrite();
lv_disp_flush_ready( disp );
}
/*Read the touchpad*/
void my_touchpad_read(lv_indev_drv_t *indev_driver, lv_indev_data_t *data) {
uint16_t x, y;
if (tft.getTouch(&x, &y)) {
data->state = LV_INDEV_STATE_PR;
data->point.x = x;
data->point.y = y;
} else {
data->state = LV_INDEV_STATE_REL;
}
}
void setup()
{
Serial.begin( 115200 ); /* prepare for possible serial debug */
String LVGL_Arduino = "Hello Arduino! ";
LVGL_Arduino += String('V') + lv_version_major() + "." + lv_version_minor() + "." + lv_version_patch();
Serial.println( LVGL_Arduino );
Serial.println( "I am LVGL_Arduino" );
initDisplay();
lv_init();
#if LV_USE_LOG != 0
lv_log_register_print_cb( my_print ); /* register print function for debugging */
#endif
tft.begin(); /* TFT init */
tft.setRotation( 3 ); /* Landscape orientation, flipped */
//lv_disp_draw_buf_init( &draw_buf, buf, NULL, screenWidth * screenHeight / 10 ); //Old
lv_disp_draw_buf_init(&draw_buf, buf, NULL, screenWidth * 10);
/*Initialize the display*/
static lv_disp_drv_t disp_drv;
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 );
ui_init();
Serial.println( "Setup done" );
}
void loop()
{
lv_timer_handler(); /* let the GUI do its work */
delay(5);
}
void initDisplay() {
tft.begin();
tft.setRotation(2);
tft.setBrightness(255);
tft.fillScreen(TFT_BLACK);
}