mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 05:24:14 +00:00
Merge remote-tracking branch 'origin/integration' into integration
This commit is contained in:
@@ -175,6 +175,7 @@ class USBClient : public Component {
|
||||
// Lock-free pool management using atomic bitmask (no dynamic allocation)
|
||||
// Bit i = 1: requests_[i] is in use, Bit i = 0: requests_[i] is available
|
||||
// Supports multiple concurrent consumers and producers (both threads can allocate/deallocate)
|
||||
// 2-byte members packed together; trq_in_use_ is uint16_t when MAX_REQUESTS <= 16
|
||||
std::atomic<trq_bitmask_t> trq_in_use_;
|
||||
uint16_t vid_{};
|
||||
uint16_t pid_{};
|
||||
|
||||
@@ -233,7 +233,11 @@ void USBClient::setup() {
|
||||
if (this->usb_task_handle_ == nullptr) {
|
||||
ESP_LOGE(TAG, "Failed to create USB task");
|
||||
this->mark_failed();
|
||||
return;
|
||||
}
|
||||
|
||||
// Start with loop disabled - it will be enabled by client_event_cb when events arrive
|
||||
this->disable_loop();
|
||||
}
|
||||
|
||||
void USBClient::usb_task_fn(void *arg) {
|
||||
|
||||
Reference in New Issue
Block a user