pub struct Config {
pub hsi: bool,
pub hse: Option<Hse>,
pub pll1: Option<Pll>,
pub sys: Sysclk,
pub ahb_pre: AHBPrescaler,
pub ahb5_pre: AHB5Prescaler,
pub apb1_pre: APBPrescaler,
pub apb2_pre: APBPrescaler,
pub apb7_pre: APBPrescaler,
pub ls: LsConfig,
pub voltage_scale: VoltageScale,
pub mux: ClockMux,
}Expand description
Clocks configuration
Fields§
§hsi: bool§hse: Option<Hse>§pll1: Option<Pll>§sys: Sysclk§ahb_pre: AHBPrescaler§ahb5_pre: AHB5Prescaler§apb1_pre: APBPrescaler§apb2_pre: APBPrescaler§apb7_pre: APBPrescaler§ls: LsConfig§voltage_scale: VoltageScale§mux: ClockMuxPer-peripheral kernel clock selection muxes
Implementations§
Source§impl Config
impl Config
pub const fn new() -> Self
Sourcepub const fn new_wpan_lsi() -> Self
pub const fn new_wpan_lsi() -> Self
BLE radio config for boards without an LSE crystal.
Identical to new_wpan except the 32 kHz sleep-timer clock comes from
LSI1 (internal RC) instead of LSE. LSI is less accurate (~1-2% vs <20 ppm for LSE), which
increases BLE sleep-clock tolerance and slightly degrades power consumption in deep sleep.
RADIOSTSEL is set to Lsi (hardware bit value 0x02).
pub const fn new_wpan() -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToMutAligned for Twhere
T: ?Sized,
impl<T> ToMutAligned for Twhere
T: ?Sized,
Source§fn to_mut_aligned<A>(&mut self) -> &mut Aligned<A, <T as ToMutAligned>::Element>where
A: Alignment,
fn to_mut_aligned<A>(&mut self) -> &mut Aligned<A, <T as ToMutAligned>::Element>where
A: Alignment,
Create a type-checked aligned value from a value that is aligned.