mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-02-05 18:40:21 +00:00
Fixed assert when calling cancel_alarm(0) (#1173)
This commit is contained in:
parent
826efbc524
commit
c7211db2b3
@ -291,6 +291,7 @@ alarm_id_t alarm_pool_add_alarm_at_force_in_context(alarm_pool_t *pool, absolute
|
||||
}
|
||||
|
||||
bool alarm_pool_cancel_alarm(alarm_pool_t *pool, alarm_id_t alarm_id) {
|
||||
if (!alarm_id) return false;
|
||||
bool rc = false;
|
||||
uint32_t save = spin_lock_blocking(pool->lock);
|
||||
pheap_node_id_t id = (pheap_node_id_t) alarm_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user