feat: added esp-idf v6.0.0 support

This commit is contained in:
aZholtikov committed 2026-03-28 08:41:18 +03:00
1 parent 6bb44bae46
commit 86a2163676
4 files changed
+10 -5

No files matched your search

+6 -1
View File
@@ -1 +1,6 @@
idf_component_register(SRCS "zh_encoder.c" INCLUDE_DIRS "include" REQUIRES esp_event driver esp_timer)
if(${IDF_VERSION_MAJOR} STREQUAL 6)
set(requires esp_driver_gpio esp_driver_pcnt esp_timer esp_event)
else()
set(requires driver esp_timer esp_event)
endif()
idf_component_register(SRCS "zh_encoder.c" INCLUDE_DIRS "include" REQUIRES ${requires})
+2 -2
View File
@@ -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
@@ -10,7 +10,7 @@
## Features
1. Support some encoders on one device.
1. Support up to 8 encoders on one device.
## Attention
+1 -1
View File
@@ -1 +1 @@
2.3.1
2.4.0
+1 -1
View File
@@ -22,7 +22,7 @@ static portMUX_TYPE _spinlock = portMUX_INITIALIZER_UNLOCKED;
volatile static uint8_t _encoder_counter = 0;
static zh_encoder_stats_t _stats = {0};
volatile static uint8_t _encoder_number_matrix[CONFIG_SOC_PCNT_UNITS_PER_GROUP] = {0};
volatile static uint8_t _encoder_number_matrix[8] = {0};
static esp_err_t _zh_encoder_validate_config(const zh_encoder_init_config_t *config, zh_encoder_handle_t *handle);
static esp_err_t _zh_encoder_pcnt_init(const zh_encoder_init_config_t *config, zh_encoder_handle_t *handle);