We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 297743d commit b9350bbCopy full SHA for b9350bb
src/nimble/nimble_npl_os.h
@@ -235,7 +235,10 @@ ble_npl_callout_stop(struct ble_npl_callout *co)
235
static inline bool
236
ble_npl_callout_is_active(struct ble_npl_callout *co)
237
{
238
- return xTimerIsTimerActive(co->handle) == pdTRUE;
+ /* Workaround for bug in xTimerIsTimerActive with latest arduino core.
239
+ * Sometimes xTimerIsTimerActive returns pdTRUE even though the timer has expired, so we double check.
240
+ */
241
+ return xTimerIsTimerActive(co->handle) == pdTRUE && xTimerGetExpiryTime(co->handle) > xTaskGetTickCountFromISR();
242
}
243
244
static inline ble_npl_time_t
0 commit comments