X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fwait.h;h=82727be01254d93eb73f4eb9a05945df197583ff;hb=3e8289b53ce929484651fc065fb5f718e4e3ae21;hp=40d00b0c75184e88f1effc9a9153bde01979d9fc;hpb=1a02ebcc612e9a9c0d87e02295c7258de3a70ccc;p=max%2Ftmk_keyboard.git diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index 40d00b0c..82727be0 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 }