unix/mphalport: Add mp_hal_delay_us() for consistency with other ports.

This commit is contained in:
Pavol Rusnak 2016-04-29 14:26:25 +02:00 committed by Paul Sokolovsky
parent 13d06a83e1
commit bc7ca7ca01

View File

@ -35,6 +35,7 @@ void mp_hal_stdio_mode_raw(void);
void mp_hal_stdio_mode_orig(void); void mp_hal_stdio_mode_orig(void);
static inline void mp_hal_delay_ms(mp_uint_t ms) { usleep((ms) * 1000); } 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); }
#define RAISE_ERRNO(err_flag, error_val) \ #define RAISE_ERRNO(err_flag, error_val) \
{ if (err_flag == -1) \ { if (err_flag == -1) \