Skip to content

Commit

Permalink
fix msc host wait for io issue with freertos
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Sep 18, 2023
1 parent fe9ae96 commit 3861b59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/arduino/msc/Adafruit_USBH_MSC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ bool Adafruit_USBH_MSC_BlockDevice::isBusy(void) { return _busy; }

bool Adafruit_USBH_MSC_BlockDevice::wait_for_io(void) {
while (_busy) {
tuh_task();
if (tuh_task_event_ready()) {
tuh_task();
}
}

return true;
Expand Down

0 comments on commit 3861b59

Please sign in to comment.