X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=tmk_core%2Fcommon%2Fwait.h;h=82727be01254d93eb73f4eb9a05945df197583ff;hb=97f9b05efb916b37c1f2c27a69972628cb7828e0;hp=40d00b0c75184e88f1effc9a9153bde01979d9fc;hpb=a3d96d3aa96318d339a67de1085e0ae495d57c84;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 }