Merge branch 'fix/touch_read_check' into 'master'

fix(touch): fix hw_ver1 read data check

Closes IDFGH-17938

See merge request espressif/esp-idf!50617
This commit is contained in:
Hu Rui
2026-07-10 20:00:21 +08:00

View File

@@ -249,7 +249,7 @@ esp_err_t touch_priv_channel_read_data(touch_channel_handle_t chan_handle, touch
{
ESP_RETURN_ON_FALSE_ISR(type >= TOUCH_CHAN_DATA_TYPE_RAW && type <= TOUCH_CHAN_DATA_TYPE_SMOOTH,
ESP_ERR_INVALID_ARG, TAG, "The channel data type is invalid");
ESP_RETURN_ON_FALSE_ISR(type == TOUCH_CHAN_DATA_TYPE_SMOOTH && chan_handle->base->data_filter_fn != NULL,
ESP_RETURN_ON_FALSE_ISR(type != TOUCH_CHAN_DATA_TYPE_SMOOTH || chan_handle->base->data_filter_fn != NULL,
ESP_ERR_INVALID_STATE, TAG, "The software filter has not configured");
TOUCH_ENTER_CRITICAL_SAFE(TOUCH_PERIPH_LOCK);
switch (type) {