Struct stm32wlxx_hal::subghz::SleepCfg
source · pub struct SleepCfg(/* private fields */);
Expand description
Sleep configuration.
Argument of set_sleep
.
Implementations§
source§impl SleepCfg
impl SleepCfg
sourcepub const fn new() -> SleepCfg
pub const fn new() -> SleepCfg
Create a new SleepCfg
structure.
This is the same as default
, but in a const
function.
The defaults are a warm startup, with RTC wakeup enabled.
Example
use stm32wlxx_hal::subghz::SleepCfg;
const SLEEP_CFG: SleepCfg = SleepCfg::new();
assert_eq!(SLEEP_CFG, SleepCfg::default());
sourcepub const fn set_startup(self, startup: Startup) -> SleepCfg
pub const fn set_startup(self, startup: Startup) -> SleepCfg
Set the startup mode.
Example
use stm32wlxx_hal::subghz::{SleepCfg, Startup};
const SLEEP_CFG: SleepCfg = SleepCfg::new().set_startup(Startup::Cold);
sourcepub const fn set_rtc_wakeup_en(self, en: bool) -> SleepCfg
pub const fn set_rtc_wakeup_en(self, en: bool) -> SleepCfg
Set the RTC wakeup enable.
Example
use stm32wlxx_hal::subghz::SleepCfg;
const SLEEP_CFG: SleepCfg = SleepCfg::new().set_rtc_wakeup_en(false);
Trait Implementations§
source§impl PartialEq for SleepCfg
impl PartialEq for SleepCfg
impl Copy for SleepCfg
impl Eq for SleepCfg
impl StructuralEq for SleepCfg
impl StructuralPartialEq for SleepCfg
Auto Trait Implementations§
impl RefUnwindSafe for SleepCfg
impl Send for SleepCfg
impl Sync for SleepCfg
impl Unpin for SleepCfg
impl UnwindSafe for SleepCfg
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