页次: 1
xzyang 说:编译其他 examples\peripherals\lcd下的 demo 都是正常的,就是 rgb_panel 这个报错
LCD_CLK_SRC_DEFAULT 这个
你没设置时钟,设置一下就好了
C:/esp_test/rgb_panel/main/rgb_lcd_example_main.c:65:72: error: unknown type name 'esp_lcd_rgb_panel_event_data_t'
65 | static bool example_on_vsync_event(esp_lcd_panel_handle_t panel, const esp_lcd_rgb_panel_event_data_t *event_data, void *user_data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/esp_test/rgb_panel/main/rgb_lcd_example_main.c: In function 'app_main':
C:/esp_test/rgb_panel/main/rgb_lcd_example_main.c:103: error: unterminated #if
103 | #if CONFIG_EXAMPLE_AVOID_TEAR_EFFECT_WITH_SEM
|
C:/esp_test/rgb_panel/main/rgb_lcd_example_main.c:101:5: error: expected declaration or statement at end of input
101 | static lv_disp_drv_t disp_drv; // contains callback functions
| ^~~~~~
这个报错信息和你的一样, error: unknown type name 'esp_lcd_rgb_panel_event_data_t',头文件已经包含了,定义在esp_lcd_panel_rgb.h里面,demo 没做任何更改。
@Ray
我试了,还是报错
怎么解决报错的问题?我也遇到了:vscode+idf5.0 环境
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:65:72: error: unknown type name 'esp_lcd_rgb_panel_event_data_t'
65 | static bool example_on_vsync_event(esp_lcd_panel_handle_t panel, const esp_lcd_rgb_panel_event_data_t *event_data, void *user_data)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c: In function 'app_main':
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:122:5: error: unknown type name 'esp_lcd_rgb_panel_config_t'; did you mean 'esp_lcd_panel_handle_t'?
122 | esp_lcd_rgb_panel_config_t panel_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| esp_lcd_panel_handle_t
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:123:9: error: field name not in record or union initializer
123 | .data_width = 16, // RGB565 in parallel mode, thus 16bit in width
| ^
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:123:9: note: (near initialization for 'panel_config')
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:124:9: error: field name not in record or union initializer
124 | .psram_trans_align = 64,
| ^
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:124:9: note: (near initialization for 'panel_config')
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:124:30: warning: excess elements in scalar initializer
124 | .psram_trans_align = 64,
| ^~
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:124:30: note: (near initialization for 'panel_config')
C:/esp32/esp-idf/examples/peripherals/lcd/rgb_panel/main/rgb_lcd_example_main.c:128:9: error: field name not in record or union initializer
128 | .clk_src = LCD_CLK_SRC_DEFAULT,
页次: 1