embassy-rp: allow injection of FIFO handler #4656
Open
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.
Add
fifo-handler
feature for injecting a custom handler of FIFO messages.Also enable FIFO queue in core1->core0 direction.
In Ariel OS, we need a way to trigger the scheduler on the other core. The FIFO peripheral is made for this, but also claimed by embassy-rp, for stopping the second core from the first. Inside embassy, I think this is used to stop execution from flash while messing with it.
This PR (optionally, based on
fifo-handler
feature) makes this a bit more flexible:fifo-handler
enabled, anfn handle_fifo(u32) -> bool
is called for each FIFO message arriving from the other core that is not used for stopping or resuming.Signed-off-by: Kaspar Schleiser [email protected]