CFGR

Struct CFGR 

Source
pub struct CFGR { /* private fields */ }
Expand description

Clock configuration

Implementations§

Source§

impl CFGR

Source

pub fn hse( self, freq: Hertz, bypass: CrystalBypass, css: ClockSecuritySystem, ) -> Self

Add an HSE to the system

Source

pub fn lse(self, bypass: CrystalBypass, css: ClockSecuritySystem) -> Self

Add an 32.768 kHz LSE to the system

Source

pub fn hclk(self, freq: Hertz) -> Self

Sets a frequency for the AHB bus

Source

pub fn hsi48(self, on: bool) -> Self

Enable the 48 MHz USB, RNG, SDMMC HSI clock source. Not available on all stm32l4x6 series

Source

pub fn msi(self, range: MsiFreq) -> Self

Enables the MSI with the specified speed

Source

pub fn lsi(self, on: bool) -> Self

Sets LSI clock on (the default) or off

Source

pub fn pclk1(self, freq: Hertz) -> Self

Sets a frequency for the APB1 bus

Source

pub fn pclk2(self, freq: Hertz) -> Self

Sets a frequency for the APB2 bus

Source

pub fn sysclk(self, freq: Hertz) -> Self

Sets the system (core) frequency

Source

pub fn sysclk_with_pll(self, freq: Hertz, cfg: PllConfig) -> Self

Sets the system (core) frequency with some pll configuration

Source

pub fn pll_source(self, source: PllSource) -> Self

Sets the PLL source

Source

pub fn freeze(&self, acr: &mut ACR, pwr: &mut Pwr) -> Clocks

Freezes the clock configuration, making it effective

Auto Trait Implementations§

§

impl Freeze for CFGR

§

impl RefUnwindSafe for CFGR

§

impl Send for CFGR

§

impl Sync for CFGR

§

impl Unpin for CFGR

§

impl UnwindSafe for CFGR

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

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.