mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +00:00
Merge branch 'integration' into memory_api
This commit is contained in:
@@ -256,8 +256,9 @@ void USBUartComponent::start_input(USBUartChannel *channel) {
|
|||||||
ESP_LOGV(TAG, "Transfer result: length: %u; status %X", status.data_len, status.error_code);
|
ESP_LOGV(TAG, "Transfer result: length: %u; status %X", status.data_len, status.error_code);
|
||||||
if (!status.success) {
|
if (!status.success) {
|
||||||
ESP_LOGE(TAG, "Control transfer failed, status=%s", esp_err_to_name(status.error_code));
|
ESP_LOGE(TAG, "Control transfer failed, status=%s", esp_err_to_name(status.error_code));
|
||||||
// On failure, defer retry to main loop
|
// Transfer failed, slot already released
|
||||||
this->defer_input_retry_(channel);
|
// Mark input as not started so normal operations can restart later
|
||||||
|
channel->input_started_.store(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,9 +266,10 @@ void USBUartComponent::start_input(USBUartChannel *channel) {
|
|||||||
// Allocate a chunk from the pool
|
// Allocate a chunk from the pool
|
||||||
UsbDataChunk *chunk = this->chunk_pool_.allocate();
|
UsbDataChunk *chunk = this->chunk_pool_.allocate();
|
||||||
if (chunk == nullptr) {
|
if (chunk == nullptr) {
|
||||||
// No chunks available - defer retry to main loop for backpressure
|
// No chunks available - queue is full, data dropped, slot already released
|
||||||
this->usb_data_queue_.increment_dropped_count();
|
this->usb_data_queue_.increment_dropped_count();
|
||||||
this->defer_input_retry_(channel);
|
// Mark input as not started so normal operations can restart later
|
||||||
|
channel->input_started_.store(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user