This commit is contained in:
Jorge Aparicio 2017-04-02 20:38:45 -05:00
parent 85c628c2af
commit 0ef71d29a8

View file

@ -84,7 +84,10 @@ where
} }
/// Mutably borrows the resource for the duration of `interrupt::free` /// Mutably borrows the resource for the duration of `interrupt::free`
pub fn cs_borrow_mut<'cs>(&self, _ctxt: &'cs mut CriticalSection) -> &'cs mut P { pub fn cs_borrow_mut<'cs>(
&self,
_ctxt: &'cs mut CriticalSection,
) -> &'cs mut P {
unsafe { &mut *self.peripheral.get() } unsafe { &mut *self.peripheral.get() }
} }
} }
@ -189,7 +192,10 @@ impl<T, C> Resource<T, C> {
} }
/// Mutably borrows the resource for the duration of `interrupt::free` /// Mutably borrows the resource for the duration of `interrupt::free`
pub fn cs_borrow_mut<'cs>(&self, _ctxt: &'cs mut CriticalSection) -> &'cs mut T { pub fn cs_borrow_mut<'cs>(
&self,
_ctxt: &'cs mut CriticalSection,
) -> &'cs mut T {
unsafe { &mut *self.data.get() } unsafe { &mut *self.data.get() }
} }
} }