stm32-metapac

Crates

git

Versions

stm32h7r3r8

Flavors

Struct stm32_metapac::pwr::regs::Csr2

#[repr(transparent)]
pub struct Csr2(pub u32);
Expand description

PWR control register 2.

Tuple Fields§

§0: u32

Implementations§

§

impl Csr2

pub const fn bypass(&self) -> bool

Power management unit bypass Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub fn set_bypass(&mut self, val: bool)

Power management unit bypass Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub const fn ldoen(&self) -> bool

Low drop-out regulator enable Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub fn set_ldoen(&mut self, val: bool)

Low drop-out regulator enable Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub const fn sden(&self) -> bool

SMPS step-down converter enable Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub fn set_sden(&mut self, val: bool)

SMPS step-down converter enable Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub const fn sdexthp(&self) -> bool

SMPS external power delivery selection Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub fn set_sdexthp(&mut self, val: bool)

SMPS external power delivery selection Note: Illegal combinations of SDHILEVEL, SMPSEXTHP, SDEN, LDOEN and BYPASS are described in Table 41.

pub const fn sdlevel(&self) -> Sdlevel

SMPS step-down converter voltage output for LDO or external supply This bit is used when both the LDO and SMPS step-down converter are enabled with SDEN and LDOEN enabled or when SMPSEXTHP is enabled. In this case SDHILEVEL has to be set to 1 to confirm the regulator settings.

pub fn set_sdlevel(&mut self, val: Sdlevel)

SMPS step-down converter voltage output for LDO or external supply This bit is used when both the LDO and SMPS step-down converter are enabled with SDEN and LDOEN enabled or when SMPSEXTHP is enabled. In this case SDHILEVEL has to be set to 1 to confirm the regulator settings.

pub const fn vbe(&self) -> bool

VBAT charging enable.

pub fn set_vbe(&mut self, val: bool)

VBAT charging enable.

pub const fn vbrs(&self) -> Vbrs

VBAT charging resistor selection.

pub fn set_vbrs(&mut self, val: Vbrs)

VBAT charging resistor selection.

pub const fn xspicap1(&self) -> Xspicap

XSPI port 1 capacitor control bits see the product datasheet for more details.

pub fn set_xspicap1(&mut self, val: Xspicap)

XSPI port 1 capacitor control bits see the product datasheet for more details.

pub const fn xspicap2(&self) -> Xspicap

XSPI port 2 capacitor control bits see the product datasheet for more details.

pub fn set_xspicap2(&mut self, val: Xspicap)

XSPI port 2 capacitor control bits see the product datasheet for more details.

pub const fn en_xspim1(&self) -> bool

EN_XSPIM1: this bit allow the SW to enable the XSPI interface. The XSPIM_P1 supply must be stable prior to setting this bit.

pub fn set_en_xspim1(&mut self, val: bool)

EN_XSPIM1: this bit allow the SW to enable the XSPI interface. The XSPIM_P1 supply must be stable prior to setting this bit.

pub const fn en_xspim2(&self) -> bool

EN_XSPIM2: this bit allows the SW to enable the XSPI interface, when available. The XSPIM_P2 supply must be stable prior to setting this bit. It should also be set when FMC is used.

pub fn set_en_xspim2(&mut self, val: bool)

EN_XSPIM2: this bit allows the SW to enable the XSPI interface, when available. The XSPIM_P2 supply must be stable prior to setting this bit. It should also be set when FMC is used.

pub const fn sdextrdy(&self) -> bool

SMPS step-down converter external supply ready This bit is set by hardware to indicate that the external supply from the SMPS step-down converter is ready.

pub fn set_sdextrdy(&mut self, val: bool)

SMPS step-down converter external supply ready This bit is set by hardware to indicate that the external supply from the SMPS step-down converter is ready.

pub const fn usb33den(&self) -> bool

VDD33_USB voltage level detector enable.

pub fn set_usb33den(&mut self, val: bool)

VDD33_USB voltage level detector enable.

pub const fn usbregen(&self) -> bool

USB regulator enable.

pub fn set_usbregen(&mut self, val: bool)

USB regulator enable.

pub const fn usb33rdy(&self) -> bool

USB supply ready.

pub fn set_usb33rdy(&mut self, val: bool)

USB supply ready.

pub const fn usbhsregen(&self) -> bool

USB HS regulator enable.

pub fn set_usbhsregen(&mut self, val: bool)

USB HS regulator enable.

Trait Implementations§

§

impl Clone for Csr2

§

fn clone(&self) -> Csr2

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Default for Csr2

§

fn default() -> Csr2

Returns the “default value” for a type. Read more
§

impl PartialEq for Csr2

§

fn eq(&self, other: &Csr2) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for Csr2

§

impl Eq for Csr2

§

impl StructuralPartialEq for Csr2

Auto Trait Implementations§

§

impl Freeze for Csr2

§

impl RefUnwindSafe for Csr2

§

impl Send for Csr2

§

impl Sync for Csr2

§

impl Unpin for Csr2

§

impl UnwindSafe for Csr2

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.