summaryrefslogtreecommitdiffstats
path: root/tmk_core/common/wait.h
diff options
context:
space:
mode:
authorDidier Loiseau <didierloiseau+git@gmail.com>2016-09-11 01:26:47 +0200
committerDidier Loiseau <didierloiseau+git@gmail.com>2016-09-11 01:26:47 +0200
commitb9014c757599ca288be07629ad1d00ef66c033f1 (patch)
treeba056e704e76327c597e25d1be200c4c991efeb8 /tmk_core/common/wait.h
parent60a826923d5a6b0dbe416b0837608149ab82e470 (diff)
parent5010df3d8b68a53c382b853c7c2e45922975b631 (diff)
downloadqmk_firmware-b9014c757599ca288be07629ad1d00ef66c033f1.tar.gz
qmk_firmware-b9014c757599ca288be07629ad1d00ef66c033f1.tar.xz
Merge remote-tracking branch 'remotes/jackhumbert/master' into bépo
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
}