Skip to content

Commit 11f9bc7

Browse files
Fix us ticker build error
1 parent 0bb1bb7 commit 11f9bc7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

platform/include/platform/mbed_wait_api.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,18 @@ inline void _wait_us_inline(unsigned int us)
154154
#include <chrono>
155155

156156
// Override of wait_us() allowing a std::chrono type convertible to microseconds to be passed in.
157+
#if defined US_TICKER_PERIOD_NUM
157158
static inline void _wait_us_inline(std::chrono::microseconds const us)
158159
{
159160
_wait_us_inline(us.count());
160161
}
162+
#else
163+
static inline void wait_us(std::chrono::microseconds const us)
164+
{
165+
wait_us(us.count());
166+
}
167+
#endif
168+
161169
#endif
162170

163171
#endif

0 commit comments

Comments
 (0)