Struct stm32l0x1_hal::power::Power
source · pub struct Power<VDD, VCORE, RTC> { /* private fields */ }
Expand description
The constrained Power peripheral
Implementations§
source§impl<VDD, RTC> Power<VDD, VCoreRange2, RTC>
impl<VDD, RTC> Power<VDD, VCoreRange2, RTC>
sourcepub fn into_vdd_range<NEWVDD>(self) -> Power<VDD, VCoreRange2, RTC>
pub fn into_vdd_range<NEWVDD>(self) -> Power<VDD, VCoreRange2, RTC>
Change the VDD range (logically - not physically)
source§impl<VDD, RTC> Power<VDD, VCoreRange3, RTC>
impl<VDD, RTC> Power<VDD, VCoreRange3, RTC>
sourcepub fn into_vdd_range<NEWVDD>(self) -> Power<VDD, VCoreRange3, RTC>
pub fn into_vdd_range<NEWVDD>(self) -> Power<VDD, VCoreRange3, RTC>
Change the VDD range (logically - not physically)
source§impl<VCORE, RTC> Power<VddHigh, VCORE, RTC>
impl<VCORE, RTC> Power<VddHigh, VCORE, RTC>
sourcepub fn into_vcore_range<NEWRANGE>(self) -> Power<VddHigh, NEWRANGE, RTC>where
NEWRANGE: Vos,
pub fn into_vcore_range<NEWRANGE>(self) -> Power<VddHigh, NEWRANGE, RTC>where
NEWRANGE: Vos,
Change the power peripheral’s VCoreRange type state.
This does not take effect until enact()
is called
source§impl<RTC> Power<VddLow, VCoreRange2, RTC>
impl<RTC> Power<VddLow, VCoreRange2, RTC>
sourcepub fn into_vcore_range(self) -> Power<VddLow, VCoreRange3, RTC>
pub fn into_vcore_range(self) -> Power<VddLow, VCoreRange3, RTC>
Change the power peripheral’s VCoreRange type state.
This does not take effect until enact()
is called
source§impl<RTC> Power<VddLow, VCoreRange3, RTC>
impl<RTC> Power<VddLow, VCoreRange3, RTC>
sourcepub fn into_vcore_range(self) -> Power<VddLow, VCoreRange2, RTC>
pub fn into_vcore_range(self) -> Power<VddLow, VCoreRange2, RTC>
Change the power peripheral’s VCoreRange type state.
This does not take effect until enact()
is called
source§impl<VDD, VCORE, RTC> Power<VDD, VCORE, RTC>where
VCORE: Vos,
impl<VDD, VCORE, RTC> Power<VDD, VCORE, RTC>where
VCORE: Vos,
sourcepub fn dbp_context<F>(&mut self, op: F)where
F: FnMut(),
pub fn dbp_context<F>(&mut self, op: F)where
F: FnMut(),
Provide a context for changing LSE and RTC settings.
7.3.20: Note: The LSEON, LSEBYP, RTCSEL, LSEDRV and RTCEN bits in the RCC control and status register (RCC_CSR) are in the RTC domain. As these bits are write protected after reset, the DBP bit in the Power control register (PWR_CR) has to be set to be able to modify them. Refer to Section 6.1.2: RTC and RTC backup registers for further information.
sourcepub unsafe fn enact(&mut self, apb1: &mut APB1)
pub unsafe fn enact(&mut self, apb1: &mut APB1)
Enact the current Power type states
This function is unsafe because it does not validate the requested setting against the
currently configured clock. Rcc::freeze
takes care of this for you.
sourcepub fn read_vcore_range(&self) -> VCoreRange
pub fn read_vcore_range(&self) -> VCoreRange
Read the current VCoreRange value from the register