mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'bugfix/fix_esp32_touch_example_task_watchdog_issue' into 'master'
fix(legacy_touch): fixed touch read WDT issue on esp32 Closes IDFGH-14920 See merge request espressif/esp-idf!37974
This commit is contained in:
@@ -362,11 +362,15 @@ static esp_err_t _touch_pad_read(touch_pad_t touch_num, uint16_t *touch_value, t
|
||||
if (TOUCH_FSM_MODE_SW == mode) {
|
||||
touch_pad_set_group_mask((1 << touch_num), (1 << touch_num), (1 << touch_num));
|
||||
touch_pad_sw_start();
|
||||
while (!touch_hal_meas_is_done()) {};
|
||||
while (!touch_hal_meas_is_done()) {
|
||||
vTaskDelay(1);
|
||||
}
|
||||
*touch_value = touch_hal_read_raw_data(touch_num);
|
||||
touch_pad_clear_group_mask((1 << touch_num), (1 << touch_num), (1 << touch_num));
|
||||
} else if (TOUCH_FSM_MODE_TIMER == mode) {
|
||||
while (!touch_hal_meas_is_done()) {};
|
||||
while (!touch_hal_meas_is_done()) {
|
||||
vTaskDelay(1);
|
||||
}
|
||||
*touch_value = touch_hal_read_raw_data(touch_num);
|
||||
} else {
|
||||
res = ESP_FAIL;
|
||||
|
Reference in New Issue
Block a user