未验证 提交 0130856b 编写于 作者: R Rodrigo Garcia 提交者: GitHub

Improves time for setting touch interrupt (#7099)

* Improves time for setting touch interrupt

* Fixes Interrupt Touchpad initialization
Co-authored-by: NJan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
上级 3e65a572
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册