embassy-stm32

Crates

git

Versions

stm32f437ai

Flavors

Skip to main content

ResetFlags

Struct ResetFlags 

Source
pub struct ResetFlags(pub u32);
Expand description

The flags describing what caused the most recent reset, returned by reset_flags.

Which flags are available depends on the chip family.

Tuple Fields§

§0: u32

Implementations§

Source§

impl ResetFlags

Source

pub fn nrst_pin(&self) -> bool

The NRST pin was pulled low.

On many STM32 chips, internal reset sources can also drive NRST low, so this flag is commonly set together with other flags. Check the more specific flags first.

Source

pub fn software(&self) -> bool

A software reset was requested, for example with SCB::sys_reset().

Source

pub fn independent_watchdog(&self) -> bool

The independent watchdog expired.

Source

pub fn window_watchdog(&self) -> bool

The window watchdog expired.

Source

pub fn low_power(&self) -> bool

Illegal entry into a low-power mode.

This happens when Stop or Standby mode is entered while the corresponding nRST option bits are configured to generate a reset instead.

Source

pub fn power_on(&self) -> bool

A power-on or power-down reset (POR/PDR).

Other flags are usually set along with it, so check this first.

Source

pub fn brownout(&self) -> bool

A brownout reset (BOR).

On many families a power-on reset also sets this flag. Where power_on() is available, check it first.

Trait Implementations§

Source§

impl Clone for ResetFlags

Source§

fn clone(&self) -> ResetFlags

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ResetFlags

Source§

impl Eq for ResetFlags

Source§

impl PartialEq for ResetFlags

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResetFlags

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, I> Binding<I, NoHandler<I>> for T
where T: Copy, I: Interrupt,

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 = !

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.