stm32-metapac

Crates

git

Versions

stm32h7s7l8

Flavors

๐Ÿ“ฃ We want to hear from you! Fill the Rust Embedded 2024 micro-survey.

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 ยท sourceยง

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

This method 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 StructuralEq for Csr2

ยง

impl StructuralPartialEq for Csr2

Auto Trait Implementationsยง

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> 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>,

ยง

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>,

ยง

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.