using ESP-IDF v5.5.2 with ESP32-C6-Touch-AMOLED-2.06

This commit is contained in:
cqc
2026-02-01 23:28:52 +01:00
parent e4ff4bbb03
commit 818f773c49
9 changed files with 135 additions and 0 deletions

14
main/CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
set(LV_DEMO_DIR ../managed_components/lvgl__lvgl/demos)
file(GLOB_RECURSE LV_DEMOS_SOURCES ${LV_DEMO_DIR}/*.c)
idf_component_register(
SRCS main.c ${LV_DEMOS_SOURCES}
INCLUDE_DIRS . ${LV_DEMO_DIR})
idf_component_get_property(LVGL_LIB lvgl__lvgl COMPONENT_LIB)
target_compile_options(
${LVGL_LIB}
PRIVATE
-DLV_LVGL_H_INCLUDE_SIMPLE
-DLV_USE_DEMO_MUSIC
)

5
main/component.mk Normal file
View File

@ -0,0 +1,5 @@
#
# "main" pseudo-component makefile.
#
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)

7
main/idf_component.yml Normal file
View File

@ -0,0 +1,7 @@
## IDF Component Manager Manifest File
dependencies:
waveshare/esp32_c6_touch_amoled_2_06:
version: "*"
lvgl/lvgl:
version: "9.2.0"
public: true

26
main/main.c Normal file
View File

@ -0,0 +1,26 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "esp_log.h"
#include "esp_err.h"
#include "esp_check.h"
#include "esp_memory_utils.h"
#include "lvgl.h"
#include "bsp/esp-bsp.h"
#include "bsp/display.h"
#include "lv_demos.h"
void app_main(void)
{
bsp_display_start();
bsp_display_lock(0);
//lv_demo_music();
// lv_demo_benchmark();
lv_demo_widgets();
bsp_display_unlock();
}