-
Notifications
You must be signed in to change notification settings - Fork 161
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix interrupt::free
.
#433
Fix interrupt::free
.
#433
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @adamgreig (or someone else) soon. Please see the contribution instructions for more information. |
Thanks for the PR! We discussed this a bit in last week's meeting here; the trouble is basically that |
I guess in this case we need three things:
|
As far as I am aware, you can’t implement it for multi-core devices using only the standard Cortex-M peripherals. For example, on the Raspberry Silicon RP2040 you need to use the Spinlock registers in the SIO peripheral. I also don’t think you could even know you were on a multi-core system using only the standard Cortex-M peripherals. |
The I think it makes sense to then have a HAL either provide this implementation or opt into the single-core version in this crate. |
I think the HALs should provide an implementation. I’m unsure whether it’s ok for them to re-export one from here. Perhaps if it’s behind a feature flag, or in a macro, it’s OK. |
Not sure what you mean by re-export here. The HAL (for a single-core chip) will then simply activate the |
Ah, |
2b3864c
to
922b418
Compare
4a9b53d
to
a3c5b41
Compare
eb2dc48
to
d055118
Compare
d055118
to
4b01e89
Compare
627: I would like to join the HAL team. r=adamgreig a=Dirbaio I would like to - Help with `embedded-hal` development. Getting the `1.0` release done, helping with async, reviewing... - Adopt [`critical-section`](https://github.com/embassy-rs/critical-section) into the WG as the official cross-arch critical section abstraction. See rust-embedded/cortex-m#433, also discussed in some WG meetings previously. (I guess HAL is the most fitting team for it?) Thank you! ~ Dario Nieuwenhuis Co-authored-by: Dario Nieuwenhuis <[email protected]>
I've released |
447: Add implementation for critical-section 1.0 r=adamgreig a=Dirbaio Picking up #433 since it seems stalled. Changes from #433 are: - Update to `critical-section 1.0.0-alpha.2` - Use `bool` restore token - Name Cargo feature `critical-section-single-core`. TODO before merging: - [x] Wait for `critical-section 1.0` release rust-embedded/critical-section#19 Co-Authored-By: Markus Reiter `@reitermarkus` Co-authored-by: Dario Nieuwenhuis <[email protected]>
447: Add implementation for critical-section 1.0 r=adamgreig a=Dirbaio Picking up #433 since it seems stalled. Changes from #433 are: - Update to `critical-section 1.0.0-alpha.2` - Use `bool` restore token - Name Cargo feature `critical-section-single-core`. TODO before merging: - [x] Wait for `critical-section 1.0` release rust-embedded/critical-section#19 Co-Authored-By: Markus Reiter `@reitermarkus` Co-authored-by: Dario Nieuwenhuis <[email protected]>
Fixed in #447. |
Don't pass
CricialSection
to closure passed tointerrupt::free
.Depends on rust-embedded/critical-section#13.