We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 411d045 commit 91722fcCopy full SHA for 91722fc
1 file changed
cortex-m/src/peripheral/nvic.rs
@@ -172,7 +172,7 @@ impl NVIC {
172
// note(unsafe) atomic read with no side effects
173
let nvic = unsafe { Self::steal() };
174
let ipr_n = nvic
175
- .read_ipr(Self::ipr_index())
+ .read_ipr(Self::ipr_index(interrupt))
176
.expect("unexpected interrupt number");
177
((ipr_n >> Self::ipr_shift(interrupt)) & 0x0000_00ff) as u8
178
}
@@ -278,7 +278,7 @@ impl NVIC {
278
#[cfg(armv6m)]
279
{
280
// NOTE(unsafe) atomic stateless write; IPR doesn't store any state
281
- let nvic = unsafe { Self::steal() };
+ let mut nvic = unsafe { Self::steal() };
282
nvic.modify_ipr(Self::ipr_index(interrupt), |mut value| {
283
let mask = 0x0000_00ff << Self::ipr_shift(interrupt);
284
let prio = u32::from(prio) << Self::ipr_shift(interrupt);
0 commit comments