summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/wait.h
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-07-04 18:32:08 +0200
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-07-04 18:32:08 +0200
commit2e1cfaf73fccdfaba2d7542f00bd7c3d49998d5d (patch)
tree9d8e9c6b71116f01c56c870a9e1071760899ff77 /tmk_core/common/wait.h
parent44a5f7630f18b40b36270d49449a43cd42b802f0 (diff)
parent9e01b219f32b0086728c10658928b8bffcc26ef7 (diff)
downloadqmk_firmware-2e1cfaf73fccdfaba2d7542f00bd7c3d49998d5d.tar.gz
qmk_firmware-2e1cfaf73fccdfaba2d7542f00bd7c3d49998d5d.tar.xz
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common/wait.h')
-rw-r--r--tmk_core/common/wait.h8
1 files changed, 6 insertions, 2 deletions
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 <util/delay.h>
# 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
}