diff options
Diffstat (limited to 'src/peripheral/mod.rs')
-rw-r--r-- | src/peripheral/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs index f47baf5..f9ee217 100644 --- a/src/peripheral/mod.rs +++ b/src/peripheral/mod.rs @@ -10,7 +10,7 @@ use core::ptr; use volatile_register::{RO, RW, WO}; -use interrupt::{CsCtxt, Nr}; +use interrupt::{CriticalSection, Nr}; #[cfg(test)] mod test; @@ -69,8 +69,8 @@ impl<T> Peripheral<T> { } } - /// Borrows the peripheral for the duration of the critical section - pub fn borrow<'cs>(&self, _ctxt: &'cs CsCtxt) -> &'cs T { + /// Borrows the peripheral for the duration of a critical section + pub fn borrow<'cs>(&self, _ctxt: &'cs CriticalSection) -> &'cs T { unsafe { &*self.get() } } |