summaryrefslogtreecommitdiff
path: root/platforms/chibios/wait.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-03-07 21:04:22 +1100
committerGitHub <noreply@github.com>2022-03-07 21:04:22 +1100
commit44f1bd9b3a9185951c283ceb5eeb2ecc2be72418 (patch)
tree6f1439e605c94af81c5bb9be62cec6aaad55f923 /platforms/chibios/wait.c
parent5de515526d46787100dcab1588aab51178c6cb8d (diff)
ChibiOS 21.11.1 update. (#16251)
* ChibiOS 21.11.1 update. * `uf2-tinyuf2` => `tinyuf2` * Updated chibios-contrib, fixup preprocessor for tinyuf2 bootloader. * Fixup keychron L433 boards. * Makefile cleanup. * RISC-V build fixes. * Fixup RISC-V build.
Diffstat (limited to 'platforms/chibios/wait.c')
-rw-r--r--platforms/chibios/wait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/chibios/wait.c b/platforms/chibios/wait.c
index 56fd6ffcec..88cb5e6d54 100644
--- a/platforms/chibios/wait.c
+++ b/platforms/chibios/wait.c
@@ -31,7 +31,7 @@ void wait_us(uint16_t duration) {
* Only use this timer on the main thread;
* other threads need to use their own timer.
*/
- if (chThdGetSelfX() == &ch.mainthread && duration < (1ULL << (sizeof(gptcnt_t) * 8))) {
+ if (chThdGetSelfX() == &(currcore->mainthread) && duration < (1ULL << (sizeof(gptcnt_t) * 8))) {
gptStart(&WAIT_US_TIMER, &gpt_cfg);
gptPolledDelay(&WAIT_US_TIMER, duration);
} else {