pub struct ResumablePeripheral<T: SuspendablePeripheral>(/* private fields */);Expand description
A mutex-like object to resume a peripheral. Does nothing when low-power is not enabled.
Implementations§
Source§impl<T: SuspendablePeripheral> ResumablePeripheral<T>
impl<T: SuspendablePeripheral> ResumablePeripheral<T>
Sourcepub fn new(peripheral: T) -> Self
pub fn new(peripheral: T) -> Self
Create the object. Will suspend the peripheral as soon as it is passed.
Sourcepub fn borrow(&mut self) -> ResumablePeripheralGuard<'_, T>
pub fn borrow(&mut self) -> ResumablePeripheralGuard<'_, T>
Get the resumable peripheral guard
Auto Trait Implementations§
impl<T> Freeze for ResumablePeripheral<T>where
T: Freeze,
impl<T> RefUnwindSafe for ResumablePeripheral<T>where
T: RefUnwindSafe,
impl<T> Send for ResumablePeripheral<T>where
T: Send,
impl<T> Sync for ResumablePeripheral<T>where
T: Sync,
impl<T> Unpin for ResumablePeripheral<T>where
T: Unpin,
impl<T> UnwindSafe for ResumablePeripheral<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ToMutAligned for Twhere
T: ?Sized,
impl<T> ToMutAligned for Twhere
T: ?Sized,
Source§fn to_mut_aligned<A>(&mut self) -> &mut Aligned<A, <T as ToMutAligned>::Element>where
A: Alignment,
fn to_mut_aligned<A>(&mut self) -> &mut Aligned<A, <T as ToMutAligned>::Element>where
A: Alignment,
Create a type-checked aligned value from a value that is aligned.