aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral
diff options
context:
space:
mode:
Diffstat (limited to 'src/peripheral')
-rw-r--r--src/peripheral/nvic.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/peripheral/nvic.rs b/src/peripheral/nvic.rs
index 067c1d9..fccd6a2 100644
--- a/src/peripheral/nvic.rs
+++ b/src/peripheral/nvic.rs
@@ -94,15 +94,14 @@ impl NVIC {
/// [`NVIC::pend`]: #method.pend
#[cfg(not(armv6m))]
#[inline]
- pub fn request<I>(&mut self, interrupt: I)
+ pub fn request<I>(interrupt: I)
where
I: InterruptNumber,
{
let nr = interrupt.number();
- unsafe {
- self.stir.write(u32::from(nr));
- }
+ // NOTE(ptr) this is a write to a stateless register
+ unsafe { (*Self::PTR).stir.write(u32::from(nr)) }
}
/// Disables `interrupt`