mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 15:42:22 +01:00
preen
This commit is contained in:
@@ -58,7 +58,6 @@ struct TransferRequest {
|
|||||||
USBClient *client;
|
USBClient *client;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Lightweight event types for queue
|
|
||||||
enum EventType : uint8_t {
|
enum EventType : uint8_t {
|
||||||
EVENT_DEVICE_NEW,
|
EVENT_DEVICE_NEW,
|
||||||
EVENT_DEVICE_GONE,
|
EVENT_DEVICE_GONE,
|
||||||
|
@@ -211,8 +211,6 @@ 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());
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
usb_host_client_handle_events(this->handle_, pdMS_TO_TICKS(10));
|
usb_host_client_handle_events(this->handle_, pdMS_TO_TICKS(10));
|
||||||
}
|
}
|
||||||
@@ -232,7 +230,6 @@ void USBClient::loop() {
|
|||||||
case EVENT_TRANSFER_COMPLETE:
|
case EVENT_TRANSFER_COMPLETE:
|
||||||
case EVENT_CONTROL_COMPLETE: {
|
case EVENT_CONTROL_COMPLETE: {
|
||||||
auto *trq = event->data.transfer.trq;
|
auto *trq = event->data.transfer.trq;
|
||||||
// Callback was already executed in USB task, just cleanup
|
|
||||||
this->release_trq(trq);
|
this->release_trq(trq);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user