mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 15:12:21 +01:00
ato
This commit is contained in:
@@ -223,8 +223,9 @@ void USBUartComponent::dump_config() {
|
|||||||
void USBUartComponent::start_input(USBUartChannel *channel) {
|
void USBUartComponent::start_input(USBUartChannel *channel) {
|
||||||
if (!channel->initialised_.load() || channel->input_started_.load())
|
if (!channel->initialised_.load() || channel->input_started_.load())
|
||||||
return;
|
return;
|
||||||
// Note: We no longer check ring buffer space here since this may be called from USB task
|
// Note: This function is called from both USB task and main loop, so we cannot
|
||||||
// The lock-free queue provides backpressure instead
|
// directly check ring buffer space here. Backpressure is handled by the chunk pool:
|
||||||
|
// when exhausted, USB input stops until chunks are freed by the main loop
|
||||||
const auto *ep = channel->cdc_dev_.in_ep;
|
const auto *ep = channel->cdc_dev_.in_ep;
|
||||||
// CALLBACK CONTEXT: This lambda is executed in USB task via transfer_callback
|
// CALLBACK CONTEXT: This lambda is executed in USB task via transfer_callback
|
||||||
auto callback = [this, channel](const usb_host::TransferStatus &status) {
|
auto callback = [this, channel](const usb_host::TransferStatus &status) {
|
||||||
|
Reference in New Issue
Block a user