Skip to content

Commit 33563b3

Browse files
authored
Merge pull request #12739 from jamesbeyond/sema_dep
FIX: update usb device tests for deprecated API
2 parents 7fce7f5 + 5a0141c commit 33563b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TESTS/usb_device/msd/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void msd_process(USBMSD *msd)
221221
Semaphore proc;
222222
msd->attach(callback(run_processing, &proc));
223223
while (!msd_process_done) {
224-
proc.wait(100);
224+
proc.try_acquire_for(100);
225225
msd->process();
226226
if (msd->media_removed()) {
227227
media_remove_event.release();
@@ -345,7 +345,7 @@ void mount_unmount_test(BlockDevice *bd, FileSystem *fs)
345345
TEST_ASSERT_EQUAL_STRING_LOOP("passed", _key, i);
346346

347347
// wait for unmount event (set 10s timeout)
348-
media_remove_event.wait(10000);
348+
media_remove_event.try_acquire_for(10000);
349349
if (!usb.media_removed()) {
350350
TEST_ASSERT_EQUAL_LOOP(true, usb.media_removed(), i);
351351
}

0 commit comments

Comments
 (0)