|
ESPHome 2026.11.0-dev
|
#include <usb_uart.h>
Public Member Functions | |
| void | write_array (const uint8_t *data, size_t len) override |
| bool | peek_byte (uint8_t *data) override |
| bool | read_array (uint8_t *data, size_t len) override |
| size_t | available () override |
| bool | is_connected () override |
| uart::UARTFlushResult | flush () override |
| void | load_settings (bool dump_config) override |
| void | set_debug (bool debug) |
| void | set_dummy_receiver (bool dummy_receiver) |
| void | set_debug_prefix (const char *prefix) |
| void | set_flush_timeout (uint32_t flush_timeout_ms) override |
| void | set_rx_callback (std::function< void()> cb) |
| Register a callback invoked immediately after data is pushed to the input ring buffer. | |
| uint8_t | get_interface_number () const |
| USB interface number a host driver binds to for this channel: the communication interface of a CDC ACM function, otherwise the data interface. | |
| uint8_t | get_interface_class () const |
bInterfaceClass of the interface get_interface_number() names | |
| uint8_t | get_port_number () const |
| Index of this port among the ports on its interface. | |
| bool | set_modem_control (bool dtr, bool rts) |
| Store DTR/RTS and send them to the device. False when not connected. | |
| bool | get_dtr () const |
| bool | get_rts () const |
Public Member Functions inherited from esphome::uart::UARTComponent | |
| void | write_array (const std::vector< uint8_t > &data) |
| void | write_byte (uint8_t data) |
| void | write_str (const char *str) |
| void | write_array_progmem (const uint8_t *data, size_t len) |
| void | write_array_progmem (const uint8_t *data, size_t len) |
| bool | read_byte (uint8_t *data) |
| virtual size_t | available_for_write () |
| size_t | paced_write_room (uint32_t last_write_ms) |
| void | set_tx_pin (InternalGPIOPin *tx_pin) |
| void | set_rx_pin (InternalGPIOPin *rx_pin) |
| void | set_flow_control_pin (InternalGPIOPin *flow_control_pin) |
| void | set_rx_buffer_size (size_t rx_buffer_size) |
| size_t | get_rx_buffer_size () |
| virtual void | set_rx_full_threshold (size_t rx_full_threshold) |
| void | set_rx_full_threshold_ms (uint8_t time) |
| size_t | get_rx_full_threshold () |
| virtual void | set_rx_timeout (size_t rx_timeout) |
| size_t | get_rx_timeout () |
| void | set_stop_bits (uint8_t stop_bits) |
| uint8_t | get_stop_bits () const |
| void | set_data_bits (uint8_t data_bits) |
| uint8_t | get_data_bits () const |
| void | set_parity (UARTParityOptions parity) |
| UARTParityOptions | get_parity () const |
| void | set_baud_rate (uint32_t baud_rate) |
| uint32_t | get_baud_rate () const |
| void | load_settings () |
| Load the UART settings. | |
| template<typename F > | |
| void | add_debug_callback (F &&callback) |
Public Member Functions inherited from esphome::Parented< USBUartComponent > | |
| Parented () | |
| Parented (USBUartComponent *parent) | |
| USBUartComponent * | get_parent () const |
| Get the parent of this object. | |
| void | set_parent (USBUartComponent *parent) |
| Set the parent of this object. | |
Static Public Attributes | |
| static constexpr uint8_t | USB_OUTPUT_CHUNK_COUNT = USB_UART_OUTPUT_CHUNK_COUNT |
Static Public Attributes inherited from esphome::uart::UARTComponent | |
| static constexpr size_t | RX_FULL_THRESHOLD_UNSET = 0 |
Protected Member Functions | |
| USBUartChannelBase (uint8_t index, uint16_t buffer_size) | |
| void | check_logger_conflict () override |
| LineStopBits | line_stop_bits_ () const |
| LineParity | line_parity_ () const |
Protected Member Functions inherited from esphome::uart::UARTComponent | |
| bool | check_read_timeout_ (size_t len=1) |
Definition at line 160 of file usb_uart.h.
|
inlineprotected |
Definition at line 217 of file usb_uart.h.
|
inlineoverridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 176 of file usb_uart.h.
|
inlineoverrideprotectedvirtual |
Implements esphome::uart::UARTComponent.
Definition at line 218 of file usb_uart.h.
|
overridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 174 of file usb_uart.cpp.
|
inline |
Definition at line 212 of file usb_uart.h.
|
inline |
bInterfaceClass of the interface get_interface_number() names
Definition at line 201 of file usb_uart.h.
|
inline |
USB interface number a host driver binds to for this channel: the communication interface of a CDC ACM function, otherwise the data interface.
Definition at line 195 of file usb_uart.h.
|
inline |
Index of this port among the ports on its interface.
Every driver here exposes one port per interface; a multiplexed driver would index its channels.
Definition at line 208 of file usb_uart.h.
|
inline |
Definition at line 213 of file usb_uart.h.
|
inlineoverridevirtual |
Reimplemented from esphome::uart::UARTComponent.
Definition at line 177 of file usb_uart.h.
|
protected |
Definition at line 740 of file usb_uart.cpp.
|
protected |
Definition at line 729 of file usb_uart.cpp.
|
overridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 755 of file usb_uart.cpp.
|
overridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 190 of file usb_uart.cpp.
|
overridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 197 of file usb_uart.cpp.
|
inline |
Definition at line 182 of file usb_uart.h.
|
inline |
Definition at line 184 of file usb_uart.h.
|
inline |
Definition at line 183 of file usb_uart.h.
|
inlineoverridevirtual |
Reimplemented from esphome::uart::UARTComponent.
Definition at line 185 of file usb_uart.h.
| bool esphome::usb_uart::USBUartChannelBase::set_modem_control | ( | bool | dtr, |
| bool | rts ) |
Store DTR/RTS and send them to the device. False when not connected.
Definition at line 760 of file usb_uart.cpp.
|
inline |
Register a callback invoked immediately after data is pushed to the input ring buffer.
Called from USBUartComponent::loop() in the main loop context. Allows consumers (e.g. ZigbeeProxy) to process bytes in the same loop iteration they arrive, eliminating one full main-loop-wakeup cycle of latency.
Definition at line 191 of file usb_uart.h.
|
overridevirtual |
Implements esphome::uart::UARTComponent.
Definition at line 140 of file usb_uart.cpp.
|
protected |
Definition at line 229 of file usb_uart.h.
|
protected |
Definition at line 238 of file usb_uart.h.
|
protected |
Definition at line 230 of file usb_uart.h.
|
protected |
Definition at line 241 of file usb_uart.h.
|
protected |
Definition at line 239 of file usb_uart.h.
|
protected |
Definition at line 232 of file usb_uart.h.
|
protected |
Definition at line 237 of file usb_uart.h.
|
protected |
Definition at line 236 of file usb_uart.h.
|
protected |
Definition at line 222 of file usb_uart.h.
|
protected |
Definition at line 234 of file usb_uart.h.
|
protected |
Definition at line 245 of file usb_uart.h.
|
protected |
Definition at line 227 of file usb_uart.h.
|
protected |
Definition at line 223 of file usb_uart.h.
|
protected |
Definition at line 235 of file usb_uart.h.
|
protected |
Definition at line 244 of file usb_uart.h.
|
protected |
Definition at line 242 of file usb_uart.h.
|
protected |
Definition at line 228 of file usb_uart.h.
|
staticconstexpr |
Definition at line 171 of file usb_uart.h.