embassy-stm32

Crates

git

Versions

stm32u599nj

Flavors

Skip to main content

Config

Struct Config 

Source
#[non_exhaustive]
pub struct Config { pub rcc: Config, pub enable_debug_during_sleep: bool, pub enable_independent_io_supply: bool, pub enable_analog_switch_booster: bool, pub enable_independent_analog_supply: bool, pub gpdma_interrupt_priority: Priority, pub enable_ucpd1_dead_battery: bool, }
Expand description

embassy-stm32 global configuration.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§rcc: Config

RCC config.

§enable_debug_during_sleep: bool

Enable debug during sleep and stop.

May increase power consumption. Defaults to true.

§enable_independent_io_supply: bool

On low-power boards (eg. stm32l4, stm32l5, stm32wba and stm32u5), some GPIO pins are powered by an auxiliary, independent power supply (VDDIO2), which needs to be enabled before these pins can be used.

May increase power consumption. Defaults to true.

§enable_analog_switch_booster: bool

Enable the I/O analog switch voltage booster.

The analog switch between a GPIO and the ADC (or comparator, or operational amplifier) has a much higher resistance when the analog supply is low, which distorts conversions of pin channels unless they are given a much longer sample time. The reference manuals ask for this booster below 2.4 V (2.7 V on the H5, H7 and H7RS). It draws extra current, so it is off by default.

On boards where only VDDA is low and VDD is not, the analog switches can instead be supplied from VDD, which this option does not do.

§enable_independent_analog_supply: bool

On the U5 series all analog peripherals are powered by a separate supply.

§gpdma_interrupt_priority: Priority

GPDMA interrupt priority.

Defaults to P0 (highest).

§enable_ucpd1_dead_battery: bool

Enables UCPD1 dead battery functionality.

Defaults to false (disabled).

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

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 Config

Source§

impl Default for Config

Source§

fn default() -> Self

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

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.