X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fwait.h;h=82727be01254d93eb73f4eb9a05945df197583ff;hb=1023a47be6b91282b92b9a44f4492aa88375bf8e;hp=40d00b0c75184e88f1effc9a9153bde01979d9fc;hpb=5ce9bf8353568b341b79b3cea676ea62a7d40442;p=qmk_firmware.git diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index 40d00b0c7..82727be01 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -9,9 +9,13 @@ extern "C" { # include # define wait_ms(ms) _delay_ms(ms) # define wait_us(us) _delay_us(us) -#elif defined(__arm__) +#elif defined(PROTOCOL_CHIBIOS) /* __AVR__ */ +# include "ch.h" +# define wait_ms(ms) chThdSleepMilliseconds(ms) +# define wait_us(us) chThdSleepMicroseconds(us) +#elif defined(__arm__) /* __AVR__ */ # include "wait_api.h" -#endif +#endif /* __AVR__ */ #ifdef __cplusplus }