Fix clang-tidy naming: snake_case params, no trailing underscore on static method

- pxHigherPriorityTaskWoken → px_higher_priority_task_woken
- uart_rx_isr_callback_ → uart_rx_isr_callback
This commit is contained in:
J. Nick Koston
2026-02-28 10:53:52 -10:00
parent 89c43b49c2
commit 3c5d877d96
5 changed files with 11 additions and 12 deletions
@@ -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);
}
@@ -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
};
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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);
}
}
+2 -2
View File
@@ -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
}