ESPHome 2026.10.0-dev
Loading...
Searching...
No Matches
esphome::usb_uart::USBUartChannel Class Referencefinal

#include <usb_uart.h>

Inheritance diagram for esphome::usb_uart::USBUartChannel:
esphome::usb_uart::USBUartChannelBase esphome::uart::UARTComponent esphome::Parented< USBUartComponent >

Public Member Functions

 USBUartChannel (uint8_t index, uint16_t buffer_size)
 
- Public Member Functions inherited from esphome::usb_uart::USBUartChannelBase
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_parity (UARTParityOptions parity)
 
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.
 
- 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)
 
bool read_byte (uint8_t *data)
 
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.
 

Additional Inherited Members

- Static Public Attributes inherited from esphome::usb_uart::USBUartChannelBase
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 inherited from esphome::usb_uart::USBUartChannelBase
 USBUartChannelBase (uint8_t index, uint16_t buffer_size)
 
void check_logger_conflict () override
 
- Protected Member Functions inherited from esphome::uart::UARTComponent
bool check_read_timeout_ (size_t len=1)
 
- Protected Attributes inherited from esphome::usb_uart::USBUartChannelBase
RingBuffer input_buffer_
 
LockFreeQueue< UsbOutputChunk, USB_OUTPUT_CHUNK_COUNToutput_queue_
 
EventPool< UsbOutputChunk, USB_OUTPUT_CHUNK_COUNT - 1 > output_pool_
 
std::function< void()> rx_callback_ {}
 
CdcEps cdc_dev_ {}
 
StringRef debug_prefix_ {}
 
UARTParityOptions parity_ {UART_CONFIG_PARITY_NONE}
 
uint32_t flush_timeout_ms_ {100}
 
std::atomic< bool > input_started_ {true}
 
std::atomic< bool > output_started_ {true}
 
std::atomic< bool > initialised_ {false}
 
const uint8_t index_
 
bool debug_ {}
 
bool dummy_receiver_ {}
 
- Protected Attributes inherited from esphome::uart::UARTComponent
InternalGPIOPintx_pin_ {}
 
InternalGPIOPinrx_pin_ {}
 
InternalGPIOPinflow_control_pin_ {}
 
size_t rx_buffer_size_ {}
 
size_t rx_full_threshold_ {RX_FULL_THRESHOLD_UNSET}
 
size_t rx_timeout_ {0}
 
uint32_t baud_rate_ {0}
 
uint8_t stop_bits_ {0}
 
uint8_t data_bits_ {0}
 
UARTParityOptions parity_ {UART_CONFIG_PARITY_NONE}
 
CallbackManager< void(UARTDirection, uint8_t)> debug_callback_ {}
 
- Protected Attributes inherited from esphome::Parented< USBUartComponent >
USBUartComponent * parent_
 

Detailed Description

Definition at line 198 of file usb_uart.h.

Constructor & Destructor Documentation

◆ USBUartChannel()

esphome::usb_uart::USBUartChannel::USBUartChannel ( uint8_t index,
uint16_t buffer_size )
inline

Definition at line 200 of file usb_uart.h.


The documentation for this class was generated from the following file: