mirror of
https://github.com/esphome/esphome.git
synced 2025-09-15 01:32:19 +01:00
cleanup
This commit is contained in:
@@ -331,11 +331,12 @@ void ESP32TouchComponent::loop() {
|
|||||||
}
|
}
|
||||||
this->setup_mode_last_log_print_ = now;
|
this->setup_mode_last_log_print_ = now;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ESP32TouchComponent::on_shutdown() {
|
void ESP32TouchComponent::on_shutdown() {
|
||||||
// Disable interrupts
|
// Disable interrupts
|
||||||
touch_pad_intr_disable(static_cast<touch_pad_intr_mask_t>(
|
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_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE | TOUCH_PAD_INTR_MASK_TIMEOUT));
|
TOUCH_PAD_INTR_MASK_TIMEOUT));
|
||||||
touch_pad_isr_deregister(touch_isr_handler, this);
|
touch_pad_isr_deregister(touch_isr_handler, this);
|
||||||
if (this->touch_queue_) {
|
if (this->touch_queue_) {
|
||||||
vQueueDelete(this->touch_queue_);
|
vQueueDelete(this->touch_queue_);
|
||||||
@@ -356,9 +357,9 @@ void ESP32TouchComponent::loop() {
|
|||||||
if (!is_wakeup_source) {
|
if (!is_wakeup_source) {
|
||||||
touch_pad_deinit();
|
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);
|
ESP32TouchComponent *component = static_cast<ESP32TouchComponent *>(arg);
|
||||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
@@ -379,7 +380,7 @@ void ESP32TouchComponent::loop() {
|
|||||||
if (xHigherPriorityTaskWoken) {
|
if (xHigherPriorityTaskWoken) {
|
||||||
portYIELD_FROM_ISR();
|
portYIELD_FROM_ISR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace esp32_touch
|
} // namespace esp32_touch
|
||||||
} // namespace esphome
|
} // namespace esphome
|
||||||
|
Reference in New Issue
Block a user