pub struct WakeGuard { /* private fields */ }Expand description
A guard that will inhibit the device from entering deep sleep while it exists.
Implementations§
Source§impl WakeGuard
impl WakeGuard
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new wake guard, that increments the “live high power token” counts.
This is typically used by HAL drivers (when a peripheral is clocked from an active-mode-only source) to inhibit sleep, OR by application code to prevent deep sleep as well.
Sourcepub fn for_power(level: &PoweredClock) -> Option<Self>
pub fn for_power(level: &PoweredClock) -> Option<Self>
Helper method to potentially create a guard if necessary for a clock.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WakeGuard
impl RefUnwindSafe for WakeGuard
impl Send for WakeGuard
impl Sync for WakeGuard
impl Unpin for WakeGuard
impl UnwindSafe for WakeGuard
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