diff --git a/esphome/components/uart/uart_component_esp_idf.cpp b/esphome/components/uart/uart_component_esp_idf.cpp index 394c33d032a..631db1e5c73 100644 --- a/esphome/components/uart/uart_component_esp_idf.cpp +++ b/esphome/components/uart/uart_component_esp_idf.cpp @@ -206,7 +206,7 @@ void IDFUARTComponent::load_settings(bool dump_config) { // Register ISR callback to wake the main loop when UART data arrives. // The callback runs in ISR context and uses vTaskNotifyGiveFromISR() to // wake the main loop task directly — no queue or FreeRTOS task needed. - uart_set_select_notif_callback(this->uart_num_, IDFUARTComponent::uart_rx_isr_callback_); + uart_set_select_notif_callback(this->uart_num_, IDFUARTComponent::uart_rx_isr_callback); #endif // USE_UART_WAKE_LOOP_ON_RX if (dump_config) { @@ -339,8 +339,8 @@ void IDFUARTComponent::check_logger_conflict() {} #ifdef USE_UART_WAKE_LOOP_ON_RX // ISR callback invoked by the ESP-IDF UART driver when data arrives. // Wakes the main loop directly via vTaskNotifyGiveFromISR() — no queue or task needed. -void IRAM_ATTR IDFUARTComponent::uart_rx_isr_callback_(uart_port_t uart_num, uart_select_notif_t uart_select_notif, - BaseType_t *task_woken) { +void IRAM_ATTR IDFUARTComponent::uart_rx_isr_callback(uart_port_t uart_num, uart_select_notif_t uart_select_notif, + BaseType_t *task_woken) { if (uart_select_notif == UART_SELECT_READ_NOTIF) { Application::wake_loop_isrsafe(task_woken); } diff --git a/esphome/components/uart/uart_component_esp_idf.h b/esphome/components/uart/uart_component_esp_idf.h index ce8f4736d48..7bb25f8dfff 100644 --- a/esphome/components/uart/uart_component_esp_idf.h +++ b/esphome/components/uart/uart_component_esp_idf.h @@ -60,8 +60,7 @@ class IDFUARTComponent : public UARTComponent, public Component { #ifdef USE_UART_WAKE_LOOP_ON_RX // ISR callback for UART RX data notification — wakes the main loop directly. - static void uart_rx_isr_callback_(uart_port_t uart_num, uart_select_notif_t uart_select_notif, - BaseType_t *task_woken); + static void uart_rx_isr_callback(uart_port_t uart_num, uart_select_notif_t uart_select_notif, BaseType_t *task_woken); #endif // USE_UART_WAKE_LOOP_ON_RX }; diff --git a/esphome/core/application.h b/esphome/core/application.h index 525ec264d85..13e0f638856 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -505,9 +505,9 @@ class Application { /// Wake the main event loop from an ISR. /// Uses vTaskNotifyGiveFromISR() — <1 us, ISR-safe. /// Only available on platforms with fast select (ESP32, LibreTiny). - /// @param pxHigherPriorityTaskWoken Set to pdTRUE if a context switch is needed. - static void IRAM_ATTR wake_loop_isrsafe(int *pxHigherPriorityTaskWoken) { - esphome_lwip_wake_main_loop_from_isr(pxHigherPriorityTaskWoken); + /// @param px_higher_priority_task_woken Set to pdTRUE if a context switch is needed. + static void IRAM_ATTR wake_loop_isrsafe(int *px_higher_priority_task_woken) { + esphome_lwip_wake_main_loop_from_isr(px_higher_priority_task_woken); } #endif #endif diff --git a/esphome/core/lwip_fast_select.c b/esphome/core/lwip_fast_select.c index 7c29ebc1927..4e7ab07125b 100644 --- a/esphome/core/lwip_fast_select.c +++ b/esphome/core/lwip_fast_select.c @@ -226,10 +226,10 @@ void esphome_lwip_wake_main_loop(void) { } // Wake the main loop from an ISR. ISR-safe variant. -void IRAM_ATTR esphome_lwip_wake_main_loop_from_isr(int *pxHigherPriorityTaskWoken) { +void IRAM_ATTR esphome_lwip_wake_main_loop_from_isr(int *px_higher_priority_task_woken) { TaskHandle_t task = s_main_loop_task; if (task != NULL) { - vTaskNotifyGiveFromISR(task, (BaseType_t *) pxHigherPriorityTaskWoken); + vTaskNotifyGiveFromISR(task, (BaseType_t *) px_higher_priority_task_woken); } } diff --git a/esphome/core/lwip_fast_select.h b/esphome/core/lwip_fast_select.h index fcf7ec805a7..b7a70a8f9f2 100644 --- a/esphome/core/lwip_fast_select.h +++ b/esphome/core/lwip_fast_select.h @@ -30,8 +30,8 @@ void esphome_lwip_wake_main_loop(void); /// Wake the main loop task from an ISR — costs <1 us. /// ISR-safe variant using vTaskNotifyGiveFromISR(). -/// @param pxHigherPriorityTaskWoken Set to pdTRUE if a context switch is needed. -void esphome_lwip_wake_main_loop_from_isr(int *pxHigherPriorityTaskWoken); +/// @param px_higher_priority_task_woken Set to pdTRUE if a context switch is needed. +void esphome_lwip_wake_main_loop_from_isr(int *px_higher_priority_task_woken); #ifdef __cplusplus }