stm32-metapac

Crates

git

Versions

stm32u385kg

Flavors

Svmcr

Struct Svmcr 

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

PWR supply voltage monitoring control register.

Tuple Fields§

§0: u32

Implementations§

§

impl Svmcr

pub const fn pvde(&self) -> bool

None 0: PVD disabled 1: PVD enabled.

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

None 0: PVD disabled 1: PVD enabled.

pub const fn pvdls(&self) -> Pvdls

These bits select the voltage threshold detected by the PVD: 000: VPVD0 around 2.0V 001: VPVD1 around 2.2V 010: VPVD2 around 2.4V 011: VPVD3 around 2.5V 100: VPVD4 around 2.6V 101: VPVD5 around 2.8V 110: VPVD6 around 2.9V 111: External input analog voltage PVD_IN (compared internally to VREFINT).

pub fn set_pvdls(&mut self, val: Pvdls)

These bits select the voltage threshold detected by the PVD: 000: VPVD0 around 2.0V 001: VPVD1 around 2.2V 010: VPVD2 around 2.4V 011: VPVD3 around 2.5V 100: VPVD4 around 2.6V 101: VPVD5 around 2.8V 110: VPVD6 around 2.9V 111: External input analog voltage PVD_IN (compared internally to VREFINT).

pub const fn uvmen(&self) -> bool

None 0: VDDUSB voltage monitor disabled 1: VDDUSB voltage monitor enabled.

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

None 0: VDDUSB voltage monitor disabled 1: VDDUSB voltage monitor enabled.

pub const fn io2vmen(&self) -> bool

None 0: VDDIO2 voltage monitor disabled 1: VDDIO2 voltage monitor enabled.

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

None 0: VDDIO2 voltage monitor disabled 1: VDDIO2 voltage monitor enabled.

pub const fn avm1en(&self) -> bool

None 0: VDDA voltage monitor 1 disabled 1: VDDA voltage monitor 1 enabled.

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

None 0: VDDA voltage monitor 1 disabled 1: VDDA voltage monitor 1 enabled.

pub const fn avm2en(&self) -> bool

None 0: VDDA voltage monitor 2 disabled 1: VDDA voltage monitor 2 enabled.

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

None 0: VDDA voltage monitor 2 disabled 1: VDDA voltage monitor 2 enabled.

pub const fn usv(&self) -> bool

This bit is used to validate the VDDUSB supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the USB peripheral. If VDDUSB is not always present in the application, the VDDUSB voltage monitor can be used to determine whether this supply is ready or not. 0: VDDUSB not present: logical and electrical isolation is applied to ignore this supply. 1: VDDUSB valid.

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

This bit is used to validate the VDDUSB supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the USB peripheral. If VDDUSB is not always present in the application, the VDDUSB voltage monitor can be used to determine whether this supply is ready or not. 0: VDDUSB not present: logical and electrical isolation is applied to ignore this supply. 1: VDDUSB valid.

pub const fn io2sv(&self) -> bool

This bit is used to validate the VDDIO2 supply for electrical and logical isolation purpose. Setting this bit is mandatory to use PG[15:2]. If VDDIO2 is not always present in the application, the VDDIO2 voltage monitor can be used to determine whether this supply is ready or not. 0: VDDIO2 not present: logical and electrical isolation is applied to ignore this supply. 1: VDDIO2 valid.

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

This bit is used to validate the VDDIO2 supply for electrical and logical isolation purpose. Setting this bit is mandatory to use PG[15:2]. If VDDIO2 is not always present in the application, the VDDIO2 voltage monitor can be used to determine whether this supply is ready or not. 0: VDDIO2 not present: logical and electrical isolation is applied to ignore this supply. 1: VDDIO2 valid.

pub const fn asv(&self) -> bool

This bit is used to validate the VDDA supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the analog peripherals. If VDDA is not always present in the application, the VDDA voltage monitor can be used to determine whether this supply is ready or not. 0: VDDA not present: logical and electrical isolation is applied to ignore this supply. 1: VDDA valid.

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

This bit is used to validate the VDDA supply for electrical and logical isolation purpose. Setting this bit is mandatory to use the analog peripherals. If VDDA is not always present in the application, the VDDA voltage monitor can be used to determine whether this supply is ready or not. 0: VDDA not present: logical and electrical isolation is applied to ignore this supply. 1: VDDA valid.

Trait Implementations§

§

impl Clone for Svmcr

§

fn clone(&self) -> Svmcr

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Svmcr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Default for Svmcr

§

fn default() -> Svmcr

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

impl PartialEq for Svmcr

§

fn eq(&self, other: &Svmcr) -> 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 Svmcr

§

impl Eq for Svmcr

§

impl StructuralPartialEq for Svmcr

Auto Trait Implementations§

§

impl Freeze for Svmcr

§

impl RefUnwindSafe for Svmcr

§

impl Send for Svmcr

§

impl Sync for Svmcr

§

impl Unpin for Svmcr

§

impl UnwindSafe for Svmcr

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.