mirror of
https://github.com/esphome/esphome.git
synced 2026-02-24 10:18:23 -07:00
4a4fd8b92c7e33f3be6175e01677dcd7be79dc7b
The logger loop disable optimization was guarded by USE_LOGGER_USB_CDC, which is a platform capability flag defined whenever the platform supports USB CDC. This meant the optimization was disabled on all ESP32-S2, S3, C3, C5, C6, C61, H2, and P4 variants regardless of whether USB CDC was actually selected as the hardware UART. Changed all guards to use USE_LOGGER_UART_SELECTION_USB_CDC which is only defined when USB CDC is the selected hardware UART. Also changed the guard logic from || to && so the loop only stays permanently active when both Zephyr AND USB CDC is selected (the only case that needs cdc_loop_() to poll port readiness). Additionally set USE_LOGGER_UART_SELECTION_USB_CDC in the Zephyr codepath when USB CDC is selected, and updated defines.h for static analysis coverage.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
478 MiB
Languages
C++
64.1%
Python
35.6%
C
0.2%
