diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/peripheral/mod.rs | 2 | ||||
-rw-r--r-- | src/register/basepri.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs index 1f9e147..d14d782 100644 --- a/src/peripheral/mod.rs +++ b/src/peripheral/mod.rs @@ -380,7 +380,7 @@ impl Nvic { /// /// NOTE See `get_priority` method for an explanation of how NVIC priorities /// work. - pub fn set_priority<I>(&self, interrupt: I, prio: u8) + pub unsafe fn set_priority<I>(&self, interrupt: I, prio: u8) where I: Nr, { diff --git a/src/register/basepri.rs b/src/register/basepri.rs index e9164c1..d5ec002 100644 --- a/src/register/basepri.rs +++ b/src/register/basepri.rs @@ -16,7 +16,7 @@ pub fn read() -> u8 { /// Writes to the CPU register #[inline(always)] -pub fn write(basepri: u8) { +pub unsafe fn write(basepri: u8) { unsafe { asm!("msr BASEPRI, $0" : |