From 73a2b00c2a199d4ec431ba7cb5fc62264c9b88ec Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Fri, 1 May 2026 23:44:13 +0300 Subject: [PATCH] fix: unsupported of various chips --- README.md | 2 +- version.txt | 2 +- zh_ttp229.c | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8bd3461..f56facd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Features -1. Support up to 4 touch pads on one device. +1. Support up to 4 touch pads on one device (depends on the used ESP32 chip). 2. Support 8 or 16 pad work mode. ## Note diff --git a/version.txt b/version.txt index afaf360..7f20734 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.0 \ No newline at end of file +1.0.1 \ No newline at end of file diff --git a/zh_ttp229.c b/zh_ttp229.c index aa88fdb..e230e75 100644 --- a/zh_ttp229.c +++ b/zh_ttp229.c @@ -163,7 +163,11 @@ static esp_err_t _zh_ttp229_rmt_init(const zh_ttp229_init_config_t *config, zh_t rmt_tx_channel_config_t tx_chan_config = { .clk_src = RMT_CLK_SRC_DEFAULT, .gpio_num = config->scl_gpio, +#if defined CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 .mem_block_symbols = 64, +#else + .mem_block_symbols = 48, +#endif .resolution_hz = 1000000, .trans_queue_depth = 4, .flags.init_level = 1, @@ -178,7 +182,11 @@ static esp_err_t _zh_ttp229_rmt_init(const zh_ttp229_init_config_t *config, zh_t rmt_rx_channel_config_t rx_chan_config = { .clk_src = RMT_CLK_SRC_DEFAULT, .gpio_num = config->sdo_gpio, +#if defined CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 .mem_block_symbols = 64, +#else + .mem_block_symbols = 48, +#endif .resolution_hz = 1000000, }; ZH_ERROR_CHECK(rmt_new_rx_channel(&rx_chan_config, &handle->rx_channel) == ESP_OK, ESP_FAIL,