Improves time for setting touch interrupt (#7099)
* Improves time for setting touch interrupt * Fixes Interrupt Touchpad initialization Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
This commit is contained in:
parent
3e65a5721a
commit
0130856b2a
1 changed files with 0 additions and 6 deletions
|
|
@ -212,19 +212,13 @@ 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;
|
||||
}
|
||||
|
||||
#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
|
||||
|
|
|
|||
Loading…
Reference in a new issue