mirror of https://github.com/ARMmbed/mbed-os.git
FIX: update usb device tests for deprecated API
parent
dba3962f16
commit
5a0141c5a1
|
@ -221,7 +221,7 @@ void msd_process(USBMSD *msd)
|
||||||
Semaphore proc;
|
Semaphore proc;
|
||||||
msd->attach(callback(run_processing, &proc));
|
msd->attach(callback(run_processing, &proc));
|
||||||
while (!msd_process_done) {
|
while (!msd_process_done) {
|
||||||
proc.wait(100);
|
proc.try_acquire_for(100);
|
||||||
msd->process();
|
msd->process();
|
||||||
if (msd->media_removed()) {
|
if (msd->media_removed()) {
|
||||||
media_remove_event.release();
|
media_remove_event.release();
|
||||||
|
@ -345,7 +345,7 @@ void mount_unmount_test(BlockDevice *bd, FileSystem *fs)
|
||||||
TEST_ASSERT_EQUAL_STRING_LOOP("passed", _key, i);
|
TEST_ASSERT_EQUAL_STRING_LOOP("passed", _key, i);
|
||||||
|
|
||||||
// wait for unmount event (set 10s timeout)
|
// wait for unmount event (set 10s timeout)
|
||||||
media_remove_event.wait(10000);
|
media_remove_event.try_acquire_for(10000);
|
||||||
if (!usb.media_removed()) {
|
if (!usb.media_removed()) {
|
||||||
TEST_ASSERT_EQUAL_LOOP(true, usb.media_removed(), i);
|
TEST_ASSERT_EQUAL_LOOP(true, usb.media_removed(), i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue