1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 23:22:21 +01:00
This commit is contained in:
J. Nick Koston
2025-09-23 21:56:22 -05:00
parent 70e89f79db
commit c08c0c111a
2 changed files with 0 additions and 4 deletions

View File

@@ -75,7 +75,6 @@ struct UsbEvent {
} device_gone; } device_gone;
struct { struct {
TransferRequest *trq; TransferRequest *trq;
bool callback_executed; // Flag to indicate callback was already executed in USB task
} transfer; } transfer;
} data; } data;
}; };

View File

@@ -212,9 +212,7 @@ void USBClient::usb_task_fn(void *arg) {
void USBClient::usb_task_loop() { void USBClient::usb_task_loop() {
ESP_LOGI(TAG, "USB task started on core %d", xPortGetCoreID()); ESP_LOGI(TAG, "USB task started on core %d", xPortGetCoreID());
// Run forever - ESPHome reboots rather than shutting down cleanly
while (true) { while (true) {
// Handle USB events with a timeout to prevent blocking forever
usb_host_client_handle_events(this->handle_, pdMS_TO_TICKS(10)); usb_host_client_handle_events(this->handle_, pdMS_TO_TICKS(10));
} }
} }
@@ -327,7 +325,6 @@ static void control_callback(const usb_transfer_t *xfer) {
UsbEvent event; UsbEvent event;
event.type = EVENT_CONTROL_COMPLETE; event.type = EVENT_CONTROL_COMPLETE;
event.data.transfer.trq = trq; event.data.transfer.trq = trq;
event.data.transfer.callback_executed = true;
xQueueSend(trq->client->get_event_queue(), &event, portMAX_DELAY); xQueueSend(trq->client->get_event_queue(), &event, portMAX_DELAY);
} }