Skip to content

Commit 3861b59

Browse files
committed
fix msc host wait for io issue with freertos
1 parent fe9ae96 commit 3861b59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/arduino/msc/Adafruit_USBH_MSC.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ bool Adafruit_USBH_MSC_BlockDevice::isBusy(void) { return _busy; }
5959

6060
bool Adafruit_USBH_MSC_BlockDevice::wait_for_io(void) {
6161
while (_busy) {
62-
tuh_task();
62+
if (tuh_task_event_ready()) {
63+
tuh_task();
64+
}
6365
}
6466

6567
return true;

0 commit comments

Comments
 (0)