-
Notifications
You must be signed in to change notification settings - Fork 171
add high level API to set priority of system handlers #117
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
Conversation
src/peripheral/scb.rs
Outdated
/// SV call interrupt | ||
SVCall, | ||
|
||
// #[cfg(not(armv6m))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so hot about having this commented out bit in here. Can we figure out whether it has configurable priority and either take it in or leave it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamgreig Thanks. PRI_12 was omitted in the Cortex-M4 documentation I read. (Not the first time ARM omits information about debugging / profiling capabilities in some revisions of their docs)
src/peripheral/scb.rs
Outdated
/// SV call interrupt | ||
SVCall, | ||
|
||
// #[cfg(not(armv6m))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/peripheral/scb.rs
Outdated
{ | ||
// NOTE(unsafe) atomic read with no side effects | ||
let shpr = unsafe { (*Self::ptr()).shpr[usize::from((index - 8) / 4)].read() }; | ||
let prio = (shpr >> (index % 4)) & 0x000000ff; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be (index % 4) * 8
?
src/peripheral/scb.rs
Outdated
#[cfg(armv6m)] | ||
{ | ||
self.shpr[usize::from((index - 8) / 4)].modify(|value| { | ||
let shift = index % 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As previous comment, (index % 4) * 8
?
it was there to maybe support adding DebugMonitor in the future but it has already been added
lints have changed between nightly and stable
Addressed review comments |
bors try |
tryBuild succeeded |
bors r+ |
117: add high level API to set priority of system handlers r=therealprof a=japaric needed for cortex-m-rtfm v0.4.x (it makes my life easier / it makes it easier to support ARMv6-M) r? @rust-embedded/cortex-m (anyone) Co-authored-by: Jorge Aparicio <[email protected]>
Build succeeded |
needed for cortex-m-rtfm v0.4.x (it makes my life easier / it makes it easier to
support ARMv6-M)
r? @rust-embedded/cortex-m (anyone)