#[repr(C)]pub enum CPUSleep {
WaitForInterrupt = 0,
WaitForEvent = 1,
ForbidSleep = 2,
AllowSleep = 3,
}Expand description
Low power configuration support, defining the CPU sleep state exit event
There are multiple HW events that may terminate a low-power hardware cycle. These are separated in two main families:
- Interrupt event (external interrupt)
- external event (not interrupt related)
Moreover, there is some time when the CPU must NOT enter sleep mode for a given amount of time. This can be set with this CPUSleep configuration state.
FIXME: the sleep trigger and the sleep constraints shoud be defined in separated types and calls.
Variants§
WaitForInterrupt = 0
Enter sleep mode and wait for external interrupt
WaitForEvent = 1
Enter sleep mode and wait for external event
ForbidSleep = 2
Disable any enter to the low power mode
AllowSleep = 3
Re-enable low power
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CPUSleep
impl RefUnwindSafe for CPUSleep
impl Send for CPUSleep
impl Sync for CPUSleep
impl Unpin for CPUSleep
impl UnwindSafe for CPUSleep
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