Skip to content

add NVIC::{mask,unmask} #150

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

Merged
merged 1 commit into from
Jun 19, 2019
Merged

add NVIC::{mask,unmask} #150

merged 1 commit into from
Jun 19, 2019

Conversation

japaric
Copy link
Member

@japaric japaric commented Jun 19, 2019

these are the "static method" (methods that don't take self) versions of
NVIC::{enable,disable} in the same vein as the existing NVIC::{pend,unpend}

this commit also deprecates the existing NVIC::{enable,disable} methods and
notes that NVIC::enable is unsound because it should be an unsafe method (like
interrupt::enable and basepri::write, it can break critical sections) but it's
marked as safe. Its replacement, NVIC::unmask, has the correct unsafety setting:
it's an unsafe function.

these are the "static method" (methods that don't take `self`) versions of
NVIC::{enable,disable} in the same vein as the existing NVIC::{pend,unpend}

this commit also deprecates the existing NVIC::{enable,disable} methods and
notes that NVIC::enable is unsound because it should be an `unsafe` method (like
interrupt::enable and basepri::write, it can break critical sections) but it's
marked as safe. Its replacement, NVIC::unmask, has the correct unsafety setting:
it's an `unsafe` function.
@japaric japaric requested a review from a team as a code owner June 19, 2019 05:29
@rust-highfive
Copy link

r? @adamgreig

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Jun 19, 2019
Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@therealprof
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Jun 19, 2019
150: add NVIC::{mask,unmask} r=therealprof a=japaric

these are the "static method" (methods that don't take `self`) versions of
NVIC::{enable,disable} in the same vein as the existing NVIC::{pend,unpend}

this commit also deprecates the existing NVIC::{enable,disable} methods and
notes that NVIC::enable is unsound because it should be an `unsafe` method (like
interrupt::enable and basepri::write, it can break critical sections) but it's
marked as safe. Its replacement, NVIC::unmask, has the correct unsafety setting:
it's an `unsafe` function.

Co-authored-by: Jorge Aparicio <[email protected]>
@bors bors bot merged commit 40a60d3 into master Jun 19, 2019
@bors
Copy link
Contributor

bors bot commented Jun 19, 2019

Build succeeded

@bors bors bot deleted the mask branch June 19, 2019 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants