From a14888aab0561ae72efdab0810c2db4547898b3c Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Sat, 28 Mar 2026 08:53:09 +0300 Subject: [PATCH] feat: added esp-idf v6.0.0 support --- CMakeLists.txt | 7 ++++++- README.md | 2 +- version.txt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93d7f5a..9519d4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1 +1,6 @@ -idf_component_register(SRCS "zh_ac_dimmer.c" INCLUDE_DIRS "include" REQUIRES driver esp_timer) \ No newline at end of file +if(${IDF_VERSION_MAJOR} STREQUAL 6) + set(requires esp_driver_gpio esp_driver_gptimer esp_timer) +else() + set(requires driver esp_timer) +endif() +idf_component_register(SRCS "zh_ac_dimmer.c" INCLUDE_DIRS "include" REQUIRES ${requires}) \ No newline at end of file diff --git a/README.md b/README.md index c80db18..d9968bb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Tested on -1. [ESP32 ESP-IDF v5.5.3](https://docs.espressif.com/projects/esp-idf/en/v5.5.3/esp32/index.html) +1. [ESP32 ESP-IDF v6.0.0](https://docs.espressif.com/projects/esp-idf/en/v6.0/esp32/index.html) ## SAST Tools diff --git a/version.txt b/version.txt index 10bf840..50aea0e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.1 \ No newline at end of file +2.1.0 \ No newline at end of file