mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
update touch with review advice
This commit is contained in:
@@ -62,7 +62,6 @@ static SemaphoreHandle_t rtc_touch_mux = NULL;
|
||||
Touch Pad
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
/** Workaround for scan done interrupt issue. */
|
||||
static void touch_pad_workaround_isr_internal(void *arg)
|
||||
{
|
||||
@@ -82,7 +81,6 @@ static void touch_pad_workaround_isr_internal(void *arg)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
esp_err_t touch_pad_isr_register(intr_handler_t fn, void *arg, touch_pad_intr_mask_t intr_mask)
|
||||
{
|
||||
@@ -112,13 +110,12 @@ esp_err_t touch_pad_isr_register(intr_handler_t fn, void *arg, touch_pad_intr_ma
|
||||
}
|
||||
#endif
|
||||
esp_err_t ret = rtc_isr_register(fn, arg, en_msk);
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
/* Must ensure: After being registered, it is executed first. */
|
||||
if ( (ret == ESP_OK) && (reg_flag == false) && (intr_mask & (TOUCH_PAD_INTR_MASK_SCAN_DONE | TOUCH_PAD_INTR_MASK_TIMEOUT)) ) {
|
||||
rtc_isr_register(touch_pad_workaround_isr_internal, NULL, RTC_CNTL_TOUCH_SCAN_DONE_INT_ST_M | RTC_CNTL_TOUCH_TIMEOUT_INT_ST_M);
|
||||
reg_flag = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user