Skip to content
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

Add ability to set priority grouping. #431

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

reitermarkus
Copy link
Member

Also update interrupt::free to pass CriticalSection<'_> instead of a reference.

@rust-highfive
Copy link

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.

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Apr 21, 2022
};
crate::asm::dsb();
loop {
// wait for the reset
crate::asm::nop(); // avoid rust-lang/rust#28728
}
}

/// Set the priority grouping.
pub fn set_priority_grouping(&mut self, grouping: PriorityGrouping) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if this is safe or whether it should be an unsafe fn.

@reitermarkus reitermarkus force-pushed the priority-grouping branch 4 times, most recently from 20d4477 to 90b44f4 Compare April 22, 2022 12:31
@reitermarkus reitermarkus force-pushed the priority-grouping branch 2 times, most recently from d5b3579 to 6347d07 Compare May 5, 2022 11:20
@reitermarkus
Copy link
Member Author

@adamgreig, I extracted the unrelated changes from this PR. Should be easier to review now.

/// Priority grouping 6
Prigroup6 = 6,
/// Priority grouping 7
Prigroup7 = 7,
Copy link
Member Author

Choose a reason for hiding this comment

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

I think these values are actually swapped, at least compared to the ST HAL.

/// Priority grouping 6
Prigroup6 = 6,
/// Priority grouping 7
Prigroup7 = 7,
Copy link
Member Author

Choose a reason for hiding this comment

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

I think these values are actually swapped, at least compared to the ST HAL.

@reitermarkus
Copy link
Member Author

@adamgreig, ping.

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.

None yet

3 participants