diff options
author | skullydazed <[email protected]> | 2017-09-29 16:17:30 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2017-09-29 16:17:30 -0700 |
commit | 5fd68266f5d90b2c7045f44f678d71b782907752 (patch) | |
tree | 443e70a3f0dcebadd39a0c96857130546cc690a7 /tmk_core/common/wait.h | |
parent | b736f25e85171fceb06f01cf45a45f84dd0a4911 (diff) | |
download | qmk_firmware-5fd68266f5d90b2c7045f44f678d71b782907752.tar.gz qmk_firmware-5fd68266f5d90b2c7045f44f678d71b782907752.zip |
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
Diffstat (limited to 'tmk_core/common/wait.h')
-rw-r--r-- | tmk_core/common/wait.h | 11 |
1 files changed, 8 insertions, 3 deletions
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 <util/delay.h> # 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 |