1#if defined(USE_ESP32_VARIANT_ESP32P4) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3)
12 ESP_LOGE(TAG,
"UART parent failed; aborting");
39 ESP_LOGD(TAG,
"UART routed to local consumers");
51 : LOG_STR_LITERAL(
"bridge"));
57 ESP_LOGW(TAG,
"load_settings() ignored; change the framing on the hardware UART instead");
78 ESP_LOGD(TAG,
"Pausing bridge to route UART locally");
91 ESP_LOGW(TAG,
"Bridge failed; keeping the UART routed locally");
101 ESP_LOGD(TAG,
"UART routed to bridge");
108 ESP_LOGV(TAG,
"Dropping %zu bytes: UART routed to bridge",
len);
void mark_failed()
Mark this component as failed.
void enable_loop()
Enable this component's loop.
void disable_loop()
Disable this component's loop.
void resume()
Re-apply the host's line coding and line state, then resume forwarding.
bool is_paused() const
True once both worker tasks are off the bus and the configured framing is restored.
void pause()
Stop forwarding in both directions and hand the UART back to its configured framing,...
void flush_input()
Discard everything received so far: the peek cache and the driver's RX buffer.
void write_array(const uint8_t *data, size_t len) override
UARTParityOptions get_parity() const
UARTParityOptions parity_
uint8_t get_data_bits() const
uint8_t get_stop_bits() const
void load_settings()
Load the UART settings.
uint32_t get_baud_rate() const
size_t get_rx_buffer_size()
size_t rx_full_threshold_
size_t get_rx_full_threshold()
bool load_settings_warned_
void select_local()
Pause the bridge and route the UART to local consumers once it has stopped.
void write_array(const uint8_t *data, size_t len) override
void select_bridge()
Route the UART back to the bridge.
cdc_acm_uart::CDCACMUARTBridge * bridge_
uart::IDFUARTComponent * uart_
void dump_config() override
ESPHOME_LOG_TAG(TAG, "uart_mux")
uart::UARTParityOptions parity