From 1d769e6703501a31545e9a3692a638a815172922 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Mon, 8 Aug 2022 20:48:25 -0300 Subject: [PATCH 1/2] Improves time for setting touch interrupt --- cores/esp32/esp32-hal-touch.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cores/esp32/esp32-hal-touch.c b/cores/esp32/esp32-hal-touch.c index 539c0004f98..f383dc01ca8 100644 --- a/cores/esp32/esp32-hal-touch.c +++ b/cores/esp32/esp32-hal-touch.c @@ -220,11 +220,7 @@ static void __touchConfigInterrupt(uint8_t pin, void (*userFunc)(void), void *Ar __touchInterruptHandlers[pad].arg = Args; } -#if SOC_TOUCH_VERSION_1 // ESP32 - touch_pad_config(pad, threshold); -#elif SOC_TOUCH_VERSION_2 // ESP32S2, ESP32S3 touch_pad_set_thresh(pad, threshold); -#endif } // it keeps backwards compatibility From 6d1cb29fbe3c0e908f5b31bb967e2b60a289b372 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Wed, 10 Aug 2022 11:50:09 -0300 Subject: [PATCH 2/2] Fixes Interrupt Touchpad initialization --- cores/esp32/esp32-hal-touch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/cores/esp32/esp32-hal-touch.c b/cores/esp32/esp32-hal-touch.c index f383dc01ca8..7360e77a67d 100644 --- a/cores/esp32/esp32-hal-touch.c +++ b/cores/esp32/esp32-hal-touch.c @@ -212,9 +212,7 @@ static void __touchConfigInterrupt(uint8_t pin, void (*userFunc)(void), void *Ar } else { // attach ISR User Call __touchInit(); - #if SOC_TOUCH_VERSION_2 // ESP32S2, ESP32S3 __touchChannelInit(pad); - #endif __touchInterruptHandlers[pad].fn = userFunc; __touchInterruptHandlers[pad].callWithArgs = callWithArgs; __touchInterruptHandlers[pad].arg = Args;