diff --git a/unix/mphalport.h b/unix/mphalport.h index e440eafd4e..9e232c5609 100644 --- a/unix/mphalport.h +++ b/unix/mphalport.h @@ -34,6 +34,8 @@ void mp_hal_set_interrupt_char(char c); void mp_hal_stdio_mode_raw(void); void mp_hal_stdio_mode_orig(void); +// TODO: POSIX et al. define usleep() as guaranteedly capable only of 1s sleep: +// "The useconds argument shall be less than one million." static inline void mp_hal_delay_ms(mp_uint_t ms) { usleep((ms) * 1000); } static inline void mp_hal_delay_us(mp_uint_t us) { usleep(us); }