ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
usb_uart.h
Go to the documentation of this file.
1#pragma once
2
3#if defined(USE_ESP32_VARIANT_ESP32P4) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) || \
4 defined(USE_ESP32_VARIANT_ESP32S31) || defined(USE_ESP32_VARIANT_ESP32H4)
12#include "esphome/core/log.h"
13#include <array>
14#include <atomic>
15#include <functional>
16
17namespace esphome::usb_uart {
18
19class USBUartTypeCdcAcm;
20class USBUartComponent;
21class USBUartChannelBase;
22class USBUartTypePL2303;
23
24ESPHOME_LOG_TAG(TAG, "usb_uart");
25
26static constexpr uint8_t USB_CDC_SUBCLASS_ACM = 0x02;
27static constexpr uint8_t USB_SUBCLASS_COMMON = 0x02;
28static constexpr uint8_t USB_SUBCLASS_NULL = 0x00;
29static constexpr uint8_t USB_PROTOCOL_NULL = 0x00;
30static constexpr uint8_t USB_DEVICE_PROTOCOL_IAD = 0x01;
31static constexpr uint8_t USB_VENDOR_IFC = usb_host::USB_TYPE_VENDOR | usb_host::USB_RECIP_INTERFACE;
32static constexpr uint8_t USB_VENDOR_DEV = usb_host::USB_TYPE_VENDOR | usb_host::USB_RECIP_DEVICE;
33
34struct CdcEps {
35 const usb_ep_desc_t *notify_ep;
36 const usb_ep_desc_t *in_ep;
37 const usb_ep_desc_t *out_ep;
38 // 0xFF marks a channel that was never matched to a CDC function on the device
39 uint8_t bulk_interface_number{0xFF};
40 // Also the wIndex target for CDC class requests (SET_LINE_CODING etc.), so it
41 // must remain valid even when the interface itself is not claimed.
44 // bInterfaceClass of each interface above, which decides how a host binds the port
47};
48
78
79// 1 and 2 are the stop bit count the uart component uses, so a count set through the
80// UARTComponent API (as serial_proxy does) means the same here. 1.5 has no count.
86
87// Stop bits and parity as adapters take them on the wire: CDC SET_LINE_CODING, and the
88// CP210x, FTDI and PL2303 requests, all use these values
89enum class LineStopBits : uint8_t {
93};
94
95enum class LineParity : uint8_t {
101};
102
103// Indexed by LineParity
104static const char *const PARITY_NAMES[] = {"NONE", "ODD", "EVEN", "MARK", "SPACE"};
105// Indexed by LineStopBits
106static const char *const STOP_BITS_NAMES[] = {"1", "1.5", "2"};
107
109enum class ConfigMode : uint8_t {
113};
114
115// Structure for queuing received USB data chunks
117 uint8_t data[usb_host::USB_MAX_PACKET_SIZE];
118 uint16_t length;
120
121 // Required for EventPool - no cleanup needed for POD types
122 void release() {}
123};
124
125// Structure for queuing outgoing USB data chunks (one per USB packet)
127 static constexpr size_t MAX_CHUNK_SIZE = usb_host::USB_MAX_PACKET_SIZE;
129 uint16_t length;
130
131 // Required for EventPool - no cleanup needed for POD types
132 void release() {}
133};
134
135// Common, non-final base for all USB UART channel implementations.
136// Concrete channel types (USBUartChannel for CDC-style devices, vendor-specific
137// multiplexed channels like CH934X) derive from this and are themselves final,
138// per the "configurable classes are final" convention.
139class USBUartChannelBase : public uart::UARTComponent, public Parented<USBUartComponent> {
140 friend class USBUartComponent;
141 friend class USBUartTypeCdcAcm;
142 friend class USBUartTypeCP210X;
143 friend class USBUartTypeCH34X;
144 friend class USBUartTypeFT23XX;
145 friend class USBUartTypePL2303;
146
147 public:
148 // Number of output chunk slots per channel, derived from buffer_size config.
149 // Computed as ceil(buffer_size / 64) + 1 in Python codegen; defaults to 5 (256 / 64 + 1).
150 static constexpr uint8_t USB_OUTPUT_CHUNK_COUNT = USB_UART_OUTPUT_CHUNK_COUNT;
151
152 void write_array(const uint8_t *data, size_t len) override;
153 bool peek_byte(uint8_t *data) override;
154 bool read_array(uint8_t *data, size_t len) override;
155 size_t available() override { return this->input_buffer_.size(); }
156 bool is_connected() override { return this->initialised_.load(); }
157 uart::UARTFlushResult flush() override;
158 // Re-apply the current line settings (baud, parity, etc) to this already-open channel.
159 void load_settings(bool dump_config) override;
160 using UARTComponent::load_settings; // also bring in the no-arg overload for convenience
161 void set_debug(bool debug) { this->debug_ = debug; }
162 void set_dummy_receiver(bool dummy_receiver) { this->dummy_receiver_ = dummy_receiver; }
163 void set_debug_prefix(const char *prefix) { this->debug_prefix_ = StringRef(prefix); }
164 void set_flush_timeout(uint32_t flush_timeout_ms) override { this->flush_timeout_ms_ = flush_timeout_ms; }
165
170 void set_rx_callback(std::function<void()> cb) { this->rx_callback_ = std::move(cb); }
171
178
184
187 uint8_t get_port_number() const { return 0; }
188
190 bool set_modem_control(bool dtr, bool rts);
191 bool get_dtr() const { return this->dtr_; }
192 bool get_rts() const { return this->rts_; }
193
194 protected:
195 // Not directly instantiable; construct a concrete channel type instead.
196 USBUartChannelBase(uint8_t index, uint16_t buffer_size) : index_(index) { this->input_buffer_.init(buffer_size); }
197 void check_logger_conflict() override {}
199 LineParity line_parity_() const;
200 // Larger structures first (8+ bytes)
201 // Only the main loop touches it; the USB task hands data over through usb_data_queue_
204 // Pool sized to queue capacity (SIZE-1) because LockFreeQueue<T,N> is a ring
205 // buffer that holds N-1 elements. This guarantees allocate() returns nullptr
206 // before push() can fail, preventing a pool slot leak.
208 std::function<void()> rx_callback_{};
211 // 4-byte fields
213 // 1-byte fields (no padding between groups)
214 std::atomic<bool> input_started_{true};
215 std::atomic<bool> output_started_{true};
216 std::atomic<bool> initialised_{false};
217 const uint8_t index_;
218 bool debug_{};
220 // Asserted whenever a device connects, as a host driver does when it opens the port
221 bool dtr_{true};
222 bool rts_{true};
223 // Line settings or DTR/RTS changed while the config machine was busy; sent once it is idle
224 bool reload_pending_{false};
225 bool modem_pending_{false};
226};
227
228// Concrete channel type for CDC-style USB serial devices (2 bulk endpoints per
229// channel). All shared behavior lives in USBUartChannelBase.
230class USBUartChannel final : public USBUartChannelBase {
231 public:
232 USBUartChannel(uint8_t index, uint16_t buffer_size) : USBUartChannelBase(index, buffer_size) {}
233};
234
236 public:
237 USBUartComponent(uint16_t vid, uint16_t pid) : usb_host::USBClient(vid, pid) {}
238 void setup() override;
239 void loop() override;
240 void dump_config() override;
241 std::vector<USBUartChannelBase *> get_channels() { return this->channels_; }
242
243 void add_channel(USBUartChannelBase *channel) { this->channels_.push_back(channel); }
244
245 virtual void start_input(USBUartChannelBase *channel);
246 void start_output(USBUartChannelBase *channel);
247
248 // Begin configuring all channels (full initialisation). Called from on_connected().
249 void enable_channels();
250 // Re-apply line settings to a single, already-open channel (used by
251 // USBUartChannelBase::load_settings()).
253 // Apply the DTR/RTS state of a single, already-open channel (used by
254 // USBUartChannelBase::set_modem_control()).
256
257 // Called from loop() when input_buffer_ has insufficient space for the incoming chunk.
258 // Default is a no-op; override in device-specific subclasses that need resync on overflow.
259 virtual void on_rx_overflow(USBUartChannelBase *channel) {}
260
261 // Lock-free data transfer from USB task to main loop
262 static constexpr int USB_DATA_QUEUE_SIZE = 32;
264 // Pool sized to queue capacity (SIZE-1) — see USBUartChannelBase::output_pool_ comment.
266
267 protected:
268 // Issue one control transfer as part of the setup state machine. The completion
269 // callback (USB-task context) records the result/IN data, marks the step done and
270 // wakes the loop so run_config_machine_() advances on the loop thread. Call exactly
271 // once from config_step_()/config_device_step_() when issuing a step.
272 // An IN reply goes to cfg_response_, or to `dest` when set. A `dest` reply must be
273 // exactly data.size() bytes, else the step fails.
274 void config_transfer_(uint8_t type, uint8_t request, uint16_t value, uint16_t index,
275 const std::vector<uint8_t> &data = {}, uint8_t *dest = nullptr);
276 // (Re)start the config state machine. INIT runs over all channels; the other modes act
277 // on cfg_single_ only.
279 // Advance the config state machine; called from loop(). Returns true if it did work.
280 bool run_config_machine_();
281
282 // Per-subclass per-channel settings sequence. For the given zero-based step, issue the
283 // next control transfer via config_transfer_() and return true, or return false when the
284 // channel has no more steps. reload=true ⇒ apply only baud/parity/stop/data (skip
285 // enable/reset/DTR-RTS). ok/response carry the previous step's result and IN data.
286 virtual bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok,
287 const uint8_t *response) = 0;
288 // Optional one-time device-level setup run before the per-channel phase on init only
289 // (e.g. CH34x chip detection). Same contract as config_step_(). Default: no steps.
290 virtual bool config_device_step(uint8_t step, bool ok, const uint8_t *response) { return false; }
291 // Issue the one control transfer, via config_transfer_(), that puts the channel's dtr_
292 // and rts_ on the wire.
293 virtual void modem_control_transfer(USBUartChannelBase *channel) = 0;
294
295 // The device is only usable once the config machine has applied every channel's line
296 // settings, so the connected report waits for run_config_machine_() to finish the init
297 bool reports_connection_itself() const override { return true; }
298
299 std::vector<USBUartChannelBase *> channels_{};
300
301 // Config state machine
302 USBUartChannelBase *cfg_single_{nullptr}; // non-null: single-channel run (RELOAD or MODEM)
303 uint8_t *cfg_read_dest_{nullptr}; // where the step in flight stores its reply, if not cfg_response_
304 size_t cfg_read_len_{0}; // and the exact length it then expects
305 // synchronizes cfg_ok_/cfg_response_ across threads; a byte, since atomic<bool> does not inline on Xtensa
306 std::atomic<uint8_t> cfg_done_{0};
307 uint8_t cfg_response_[8]{}; // last IN transfer payload
309 uint8_t cfg_step_{0};
311 bool cfg_active_{false};
312 bool cfg_device_phase_{false};
313 bool cfg_in_flight_{false};
314 bool cfg_ok_{true};
315};
316
318 public:
319 USBUartTypeCdcAcm(uint16_t vid, uint16_t pid) : USBUartComponent(vid, pid) {}
320 void set_claim_comm_interface(bool claim) { this->claim_comm_interface_ = claim; }
321
322 protected:
323 virtual std::vector<CdcEps> parse_descriptors(usb_device_handle_t dev_hdl);
324 void on_connected() override;
325 void on_disconnected() override;
326 bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override;
327 void modem_control_transfer(USBUartChannelBase *channel) override;
328 // Each claimed interface pins one host hardware channel per endpoint; skipping
329 // the comm (interrupt) interface frees one on channel-poor hosts (ESP32-S3: 8).
331};
332
333// The block GET_FLOW and SET_FLOW transfer, little-endian on the wire as in memory
340
342 public:
343 USBUartTypeCP210X(uint16_t vid, uint16_t pid) : USBUartTypeCdcAcm(vid, pid) {}
344
345 protected:
346 // Matches max_channels of the CP210X type in __init__.py
347 static constexpr uint8_t MAX_CHANNELS = 3;
348
349 std::vector<CdcEps> parse_descriptors(usb_device_handle_t dev_hdl) override;
350 bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override;
351 void modem_control_transfer(USBUartChannelBase *channel) override;
352 bool config_device_step(uint8_t step, bool ok, const uint8_t *response) override;
354
355 // The block last read for each channel, so a DTR/RTS change under RTS/CTS is a single SET_FLOW
356 std::array<CP210xFlowBlock, MAX_CHANNELS> flow_blocks_{};
357 // A CP2102N whose firmware has erratum E104
358 bool no_flow_control_{false};
359};
361 public:
362 USBUartTypeCH34X(uint16_t vid, uint16_t pid) : USBUartTypeCdcAcm(vid, pid) {
363 // ch34x doesn't use the interrupt endpoint, and we don't have endpoints to spare. The
364 // comm interface is left in place unclaimed: on the CDC-style chips it is still the
365 // interface a host binds, and so the one the port is identified by.
366 this->claim_comm_interface_ = false;
367 }
368 void dump_config() override;
369
370 protected:
371 bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override;
372 void modem_control_transfer(USBUartChannelBase *channel) override;
373 bool config_device_step(uint8_t step, bool ok, const uint8_t *response) override;
374
375 private:
376 CH34xChipType chiptype_{CHIP_UNKNOWN};
377 const char *chip_name_{"unknown"};
378 uint8_t num_ports_{1};
379};
380
382 public:
383 USBUartTypeFT23XX(uint16_t vid, uint16_t pid) : USBUartTypeCdcAcm(vid, pid) {}
384
385 void start_input(USBUartChannelBase *channel) override;
386 void on_rx_overflow(USBUartChannelBase *channel) override;
387
388 protected:
389 std::vector<CdcEps> parse_descriptors(usb_device_handle_t dev_hdl) override;
390 bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override;
391 void modem_control_transfer(USBUartChannelBase *channel) override;
392
393 uint8_t chip_type_{255};
394};
395
396enum Pl2303ChipType : uint8_t {
397 PL2303_TYPE_H = 0, // Legacy, max 1.2Mbaud
398 PL2303_TYPE_HX, // max 6Mbaud, divisor encoding
399 PL2303_TYPE_TA, // max 6Mbaud, alt divisor encoding
400 PL2303_TYPE_TB, // max 12Mbaud, alt divisor encoding
401 PL2303_TYPE_HXD, // max 12Mbaud, divisor encoding
402 PL2303_TYPE_HXN, // G-series, max 12Mbaud, direct encoding only
404};
405
407 friend class USBUartChannelBase;
408
409 public:
410 USBUartTypePL2303(uint16_t vid, uint16_t pid) : USBUartTypeCdcAcm(vid, pid) {}
411
412 protected:
413 std::vector<CdcEps> parse_descriptors(usb_device_handle_t dev_hdl) override;
414 bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override;
415 void modem_control_transfer(USBUartChannelBase *channel) override;
416
418};
419
420} // namespace esphome::usb_uart
421
422#endif // USE_ESP32_VARIANT_ESP32P4 || USE_ESP32_VARIANT_ESP32S2 || USE_ESP32_VARIANT_ESP32S3 ||
423 // USE_ESP32_VARIANT_ESP32S31 || USE_ESP32_VARIANT_ESP32H4
BedjetMode mode
BedJet operating mode.
Fixed-capacity circular buffer - allocates once at runtime, never reallocates.
Definition helpers.h:487
void init(index_type capacity)
Allocate capacity - can only be called once.
Definition helpers.h:537
index_type size() const
Definition helpers.h:608
Helper class to easily give an object a parent of type T.
Definition helpers.h:2160
StringRef is a reference to a string owned by something else.
Definition string_ref.h:31
void load_settings()
Load the UART settings.
USBClient(uint16_t vid, uint16_t pid)
Definition usb_host.h:154
uint8_t get_interface_class() const
bInterfaceClass of the interface get_interface_number() names
Definition usb_uart.h:180
uart::UARTFlushResult flush() override
Definition usb_uart.cpp:145
bool read_array(uint8_t *data, size_t len) override
Definition usb_uart.cpp:168
EventPool< UsbOutputChunk, USB_OUTPUT_CHUNK_COUNT - 1 > output_pool_
Definition usb_uart.h:207
bool peek_byte(uint8_t *data) override
Definition usb_uart.cpp:161
std::function< void()> rx_callback_
Definition usb_uart.h:208
void set_rx_callback(std::function< void()> cb)
Register a callback invoked immediately after data is pushed to the input ring buffer.
Definition usb_uart.h:170
USBUartChannelBase(uint8_t index, uint16_t buffer_size)
Definition usb_uart.h:196
FixedRingBuffer< uint8_t > input_buffer_
Definition usb_uart.h:202
LockFreeQueue< UsbOutputChunk, USB_OUTPUT_CHUNK_COUNT > output_queue_
Definition usb_uart.h:203
uint8_t get_port_number() const
Index of this port among the ports on its interface.
Definition usb_uart.h:187
static constexpr uint8_t USB_OUTPUT_CHUNK_COUNT
Definition usb_uart.h:150
std::atomic< bool > input_started_
Definition usb_uart.h:214
uint8_t get_interface_number() const
USB interface number a host driver binds to for this channel: the communication interface of a CDC AC...
Definition usb_uart.h:174
void set_dummy_receiver(bool dummy_receiver)
Definition usb_uart.h:162
void set_debug_prefix(const char *prefix)
Definition usb_uart.h:163
std::atomic< bool > output_started_
Definition usb_uart.h:215
void set_flush_timeout(uint32_t flush_timeout_ms) override
Definition usb_uart.h:164
void write_array(const uint8_t *data, size_t len) override
Definition usb_uart.cpp:111
bool set_modem_control(bool dtr, bool rts)
Store DTR/RTS and send them to the device. False when not connected.
Definition usb_uart.cpp:740
LineStopBits line_stop_bits_() const
Definition usb_uart.cpp:709
USBUartChannel(uint8_t index, uint16_t buffer_size)
Definition usb_uart.h:232
USBUartChannelBase * cfg_single_
Definition usb_uart.h:302
std::atomic< uint8_t > cfg_done_
Definition usb_uart.h:306
std::vector< USBUartChannelBase * > channels_
Definition usb_uart.h:299
void start_config_(ConfigMode mode)
Definition usb_uart.cpp:558
USBUartComponent(uint16_t vid, uint16_t pid)
Definition usb_uart.h:237
bool reports_connection_itself() const override
Definition usb_uart.h:297
LockFreeQueue< UsbDataChunk, USB_DATA_QUEUE_SIZE > usb_data_queue_
Definition usb_uart.h:263
virtual void on_rx_overflow(USBUartChannelBase *channel)
Definition usb_uart.h:259
virtual void modem_control_transfer(USBUartChannelBase *channel)=0
std::vector< USBUartChannelBase * > get_channels()
Definition usb_uart.h:241
void config_transfer_(uint8_t type, uint8_t request, uint16_t value, uint16_t index, const std::vector< uint8_t > &data={}, uint8_t *dest=nullptr)
Definition usb_uart.cpp:569
virtual bool config_device_step(uint8_t step, bool ok, const uint8_t *response)
Definition usb_uart.h:290
virtual void start_input(USBUartChannelBase *channel)
Definition usb_uart.cpp:247
void apply_modem_control(USBUartChannelBase *channel)
Definition usb_uart.cpp:547
void apply_channel_settings(USBUartChannelBase *channel)
Definition usb_uart.cpp:534
void start_output(USBUartChannelBase *channel)
Definition usb_uart.cpp:316
void add_channel(USBUartChannelBase *channel)
Definition usb_uart.h:243
static constexpr int USB_DATA_QUEUE_SIZE
Definition usb_uart.h:262
EventPool< UsbDataChunk, USB_DATA_QUEUE_SIZE - 1 > chunk_pool_
Definition usb_uart.h:265
virtual bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response)=0
void modem_control_transfer(USBUartChannelBase *channel) override
Definition ch34x.cpp:185
bool config_device_step(uint8_t step, bool ok, const uint8_t *response) override
Definition ch34x.cpp:68
USBUartTypeCH34X(uint16_t vid, uint16_t pid)
Definition usb_uart.h:362
bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override
Definition ch34x.cpp:113
void modem_control_transfer(USBUartChannelBase *channel) override
Definition cp210x.cpp:261
bool config_device_step(uint8_t step, bool ok, const uint8_t *response) override
Definition cp210x.cpp:154
USBUartTypeCP210X(uint16_t vid, uint16_t pid)
Definition usb_uart.h:343
void set_flow_transfer_(USBUartChannelBase *channel)
Definition cp210x.cpp:275
std::vector< CdcEps > parse_descriptors(usb_device_handle_t dev_hdl) override
Definition cp210x.cpp:100
bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override
Definition cp210x.cpp:189
std::array< CP210xFlowBlock, MAX_CHANNELS > flow_blocks_
Definition usb_uart.h:356
static constexpr uint8_t MAX_CHANNELS
Definition usb_uart.h:347
bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override
Definition usb_uart.cpp:475
USBUartTypeCdcAcm(uint16_t vid, uint16_t pid)
Definition usb_uart.h:319
void set_claim_comm_interface(bool claim)
Definition usb_uart.h:320
virtual std::vector< CdcEps > parse_descriptors(usb_device_handle_t dev_hdl)
Definition usb_uart.cpp:65
void modem_control_transfer(USBUartChannelBase *channel) override
Definition usb_uart.cpp:513
USBUartTypeFT23XX(uint16_t vid, uint16_t pid)
Definition usb_uart.h:383
void modem_control_transfer(USBUartChannelBase *channel) override
Definition ft23xx.cpp:411
bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override
Definition ft23xx.cpp:359
void on_rx_overflow(USBUartChannelBase *channel) override
Definition ft23xx.cpp:354
std::vector< CdcEps > parse_descriptors(usb_device_handle_t dev_hdl) override
Definition ft23xx.cpp:238
void start_input(USBUartChannelBase *channel) override
Definition ft23xx.cpp:288
USBUartTypePL2303(uint16_t vid, uint16_t pid)
Definition usb_uart.h:410
std::vector< CdcEps > parse_descriptors(usb_device_handle_t dev_hdl) override
Definition pl2303.cpp:152
bool config_step(USBUartChannelBase *channel, uint8_t step, bool reload, bool ok, const uint8_t *response) override
Definition pl2303.cpp:268
void modem_control_transfer(USBUartChannelBase *channel) override
Definition pl2303.cpp:345
uint8_t type
UARTFlushResult
Result of a flush() call.
ConfigMode
What the config state machine is applying.
Definition usb_uart.h:109
@ CONFIG_MODE_RELOAD
Re-apply the line settings of one already-open channel.
@ CONFIG_MODE_MODEM
Apply the DTR/RTS state of one already-open channel.
@ CONFIG_MODE_INIT
Full initialisation of every channel after the device connected.
ESPHOME_LOG_TAG(TAG, "usb_uart")
@ UART_CONFIG_STOP_BITS_1_5
Definition usb_uart.h:84
uint32_t value
Definition hal.cpp:41
const void size_t len
Definition hal.h:68
static void uint32_t
const usb_ep_desc_t * out_ep
Definition usb_uart.h:37
uint8_t interrupt_interface_class
Definition usb_uart.h:46
const usb_ep_desc_t * notify_ep
Definition usb_uart.h:35
const usb_ep_desc_t * in_ep
Definition usb_uart.h:36
uint8_t interrupt_interface_number
Definition usb_uart.h:42
uint8_t data[usb_host::USB_MAX_PACKET_SIZE]
Definition usb_uart.h:117
USBUartChannelBase * channel
Definition usb_uart.h:119
uint8_t data[MAX_CHUNK_SIZE]
Definition usb_uart.h:128
static constexpr size_t MAX_CHUNK_SIZE
Definition usb_uart.h:127