1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

Update esphome/components/usb_host/usb_host_client.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-09-28 18:54:14 -05:00
committed by GitHub
parent f2ee0195de
commit 5334ddd9f0

View File

@@ -543,7 +543,7 @@ void USBClient::release_trq(TransferRequest *trq) {
// Atomically clear bit i to mark slot as available
// fetch_and with inverted bitmask clears the bit atomically
uint16_t bit = 1U << index;
this->trq_in_use_.fetch_and(~bit, std::memory_order_release);
this->trq_in_use_.fetch_and(static_cast<uint16_t>(~bit), std::memory_order_release);
}
} // namespace usb_host