Update tmk_core/common/wait.h

Co-Authored-By: Joel Challis <git@zvecr.com>
This commit is contained in:
skullydazed 2019-10-23 13:35:39 -07:00 committed by GitHub
parent e180496ab4
commit 699e6b229b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ extern "C" {
# define wait_us(us) _delay_us(us) # define wait_us(us) _delay_us(us)
#elif defined PROTOCOL_CHIBIOS #elif defined PROTOCOL_CHIBIOS
# include "ch.h" # include "ch.h"
# include "hal.h"
// FIXME: This doesn't compile if `NKRO_ENABLED = no` // FIXME: This doesn't compile if `NKRO_ENABLED = no`
# define wait_ms(ms) chSysPolledDelayX(MS2RTC(STM32_SYSCLK, ms)) # define wait_ms(ms) chSysPolledDelayX(MS2RTC(STM32_SYSCLK, ms))
# define wait_us(us) chSysPolledDelayX(US2RTC(STM32_SYSCLK, us)) # define wait_us(us) chSysPolledDelayX(US2RTC(STM32_SYSCLK, us))