- Notifications
You must be signed in to change notification settings - Fork8.2k
nrf: Use common implementation of machine disable/enable IRQ.#17213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
nrf: Use common implementation of machine disable/enable IRQ.#17213
Conversation
This is a breaking change due to the signature change of `enable_irq()`.Previously the signature was: machine.enable_irq()Now the signature matches other ports, and the docs, and is: machine.enable_irq(state)Where `state` is the return value from `machine.disable_irq()`.Signed-off-by: Damien George <damien@micropython.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oh, were these already no-operation when the nrf Bluetooth stack is enabled? That's a surprising trap.
Yes. I don't think there's any way around that? |
Yeah probably not, although there is a way to debug / step through application code on these chips without interrupting the stuff device called "monitor mode debugging". I bring this up because it presumably uses some form of interrupt masking which might work here to effectively mask out "application" interrupts without interrupting the soft device. |
Regardless, the changes look good, consolidating functionality and signatures to match other ports is a worthy direction to follow certainly. |
Summary
This is a breaking change due to the signature change of
enable_irq()
. Previously the signature was:Now the signature matches other ports, and the docs, and is:
Where
state
is the return value frommachine.disable_irq()
.Testing
Tested on ARDUINO_NANO_33_BLE_SENSE. That board now passes the
tests/extmod/machine_disable_irq.py
test.