1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-14 17:22:20 +01:00
This commit is contained in:
J. Nick Koston
2025-06-12 15:54:15 -05:00
parent 5d765413ef
commit bcb6b85333

View File

@@ -331,11 +331,12 @@ void ESP32TouchComponent::loop() {
}
this->setup_mode_last_log_print_ = now;
}
}
void ESP32TouchComponent::on_shutdown() {
void ESP32TouchComponent::on_shutdown() {
// Disable interrupts
touch_pad_intr_disable(static_cast<touch_pad_intr_mask_t>(
TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT));
touch_pad_intr_disable(static_cast<touch_pad_intr_mask_t>(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE |
TOUCH_PAD_INTR_MASK_TIMEOUT));
touch_pad_isr_deregister(touch_isr_handler, this);
if (this->touch_queue_) {
vQueueDelete(this->touch_queue_);
@@ -356,9 +357,9 @@ void ESP32TouchComponent::loop() {
if (!is_wakeup_source) {
touch_pad_deinit();
}
}
}
void IRAM_ATTR ESP32TouchComponent::touch_isr_handler(void *arg) {
void IRAM_ATTR ESP32TouchComponent::touch_isr_handler(void *arg) {
ESP32TouchComponent *component = static_cast<ESP32TouchComponent *>(arg);
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
@@ -379,7 +380,7 @@ void ESP32TouchComponent::loop() {
if (xHigherPriorityTaskWoken) {
portYIELD_FROM_ISR();
}
}
}
} // namespace esp32_touch
} // namespace esphome