From 5fd68266f5d90b2c7045f44f678d71b782907752 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Fri, 29 Sep 2017 16:17:30 -0700 Subject: Clueboard 60% support (#1746) * initial clueboard_60 support * LED lighting support * fix the clueboard->clueboard_66 rename * Add layout support to clueboard_60 * Fix the 60_iso layout so it's actually iso * add a default keymap for AEK layout * fix clueboard_17 * Fixup the ISO layouts * Fix the `wait_ms()/wait_us()` definitions for chibios * Fix up the wait_ms/wait_us hack. Reduce stack size. * Add a missing #include "wait.h" * commit files that should have already been comitted --- tmk_core/common/wait.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tmk_core/common/wait.h') diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index bdcb3f2a41..553f5243f1 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -11,10 +11,15 @@ extern "C" { # include # define wait_ms(ms) _delay_ms(ms) # define wait_us(us) _delay_us(us) -#elif defined(PROTOCOL_CHIBIOS) +#elif defined PROTOCOL_CHIBIOS # include "ch.h" -# define wait_ms(ms) chThdSleepMilliseconds(ms) -# define wait_us(us) chThdSleepMicroseconds(us) +# if defined(STM32F3xx_MCUCONF) +# define wait_ms(ms) chSysPolledDelayX(MS2RTC(STM32_HCLK, (ms))) +# define wait_us(us) chSysPolledDelayX(US2RTC(STM32_HCLK, (us))) +# else +# define wait_ms(ms) chThdSleepMilliseconds(ms) +# define wait_us(us) chThdSleepMicroseconds(us) +# endif #elif defined(__arm__) # include "wait_api.h" #else // Unit tests -- cgit v1.2.3