diff options
Diffstat (limited to 'platforms/chibios/wait.c')
| -rw-r--r-- | platforms/chibios/wait.c | 2 | 
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 { | 
