We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f044786 commit 4d6afcdCopy full SHA for 4d6afcd
platform/mbed_wait_api_rtos.cpp
@@ -37,13 +37,10 @@ void wait_us(int us) {
37
int ms = us / 1000;
38
if ((ms > 0) && core_util_are_interrupts_enabled()) {
39
Thread::wait((uint32_t)ms);
40
- us -= ms * 1000;
41
}
42
// Use busy waiting for sub-millisecond delays, or for the whole
43
// interval if interrupts are not enabled
44
- if (us > 0) {
45
- while((us_ticker_read() - start) < (uint32_t)us);
46
- }
+ while ((us_ticker_read() - start) < (uint32_t)us);
47
48
49
#endif // #if MBED_CONF_RTOS_PRESENT
0 commit comments