Skip to content

Commit

Permalink
Fix deadlock in attachInterruptParam (#953)
Browse files Browse the repository at this point in the history
Thanks to @imwoo90 comment in #878 (comment)
  • Loading branch information
earlephilhower authored Nov 3, 2022
1 parent 008c4d6 commit 6570c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/rp2040/wiring_private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void attachInterruptParam(pin_size_t pin, voidFuncPtrParam callback, PinStatus m
default: return; // ERROR
}
noInterrupts();
detachInterrupt(pin);
_detachInterruptInternal(pin);
CBInfo cb(callback, param);
_map.insert({pin, cb});
gpio_set_irq_enabled_with_callback(pin, events, true, _gpioInterruptDispatcher);
Expand Down

0 comments on commit 6570c48

Please sign in to comment.