zephyr: Make it clearer that gpio irqs can be hard or soft.#17095
Closed
projectgus wants to merge 1 commit into
Closed
zephyr: Make it clearer that gpio irqs can be hard or soft.#17095projectgus wants to merge 1 commit into
projectgus wants to merge 1 commit into
Conversation
This is just a comment change. Signed-off-by: Angus Gratton <[email protected]>
Contributor
Author
|
@danicampora Is that clearer? |
dpgeorge
reviewed
Apr 9, 2025
| #if MICROPY_STACK_CHECK | ||
| // This callback executes in an ISR context so the stack-limit check must be changed to | ||
| // use the ISR stack for the duration of this function (so that hard IRQ callbacks work). | ||
| // For irqs with hard=True, the callback executes in an ISR context so the |
Member
There was a problem hiding this comment.
Technically gpio_callback_handler executes in an ISR context which is what I think I intended this comment to mean (and in the parenthesis the comment here mentions that it's so hard IRQ callbacks work).
I think it's worth keeping the statement that this C function executes in an ISR context and we want hard Python callbacks to behave correctly.
See #6146 for reference.
Contributor
Author
There was a problem hiding this comment.
Ah right I missed that "this callback" refers to the enclosing function and is not referring to the Python callback.
It's probably fine to leave it how it is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quick follow-up to #16916 - the comment in the IRQ handler makes it sound like all Zephyr IRQs are hard, but actually hard and soft irqs are supported.
Testing
None, this change only updates a code comment.