diff options
author | Joel Challis <git@zvecr.com> | 2019-08-13 18:23:14 +0100 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-08-14 00:50:25 +0000 |
commit | 87487abd05900407b23fd0a61dbfbe63705cb28c (patch) | |
tree | 11a54f59755e8a6a985e469e6302186d7d9556f9 | |
parent | b188634e6f41196ef7d4756fd10dbb6f6d08a0d0 (diff) |
Fix LT() crashing some ARM keyboards (#6529)
-rw-r--r-- | tmk_core/common/wait.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index a77840bcef..9aed372b7f 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -13,8 +13,8 @@ extern "C" { # define wait_us(us) _delay_us(us) #elif defined PROTOCOL_CHIBIOS # include "ch.h" -# define wait_ms(ms) chThdSleepMilliseconds(ms) -# define wait_us(us) chThdSleepMicroseconds(us) +# define wait_ms(ms) do { if (ms != 0) { chThdSleepMilliseconds(ms); } else { chThdSleepMicroseconds(1); } } while (0) +# define wait_us(us) do { if (us != 0) { chThdSleepMicroseconds(us); } else { chThdSleepMicroseconds(1); } } while (0) #elif defined PROTOCOL_ARM_ATSAM # include "clks.h" # define wait_ms(ms) CLK_delay_ms(ms) |