Struct stm32_hal2::clocks::Clocks[][src]

pub struct Clocks {
    pub input_src: InputSrc,
    pub pllm: Pllm,
    pub plln: u8,
    pub pll_sai1_mul: u8,
    pub pll_sai2_mul: u8,
    pub pllr: Pllr,
    pub hclk_prescaler: HclkPrescaler,
    pub apb1_prescaler: ApbPrescaler,
    pub apb2_prescaler: ApbPrescaler,
    pub clk48_src: Clk48Src,
    pub sai1_enabled: bool,
    pub sai2_enabled: bool,
    pub hse_bypass: bool,
    pub security_system: bool,
    pub hsi48_on: bool,
}

Settings used to configure clocks.

Fields

input_src: InputSrcpllm: Pllmplln: u8pll_sai1_mul: u8pll_sai2_mul: u8pllr: Pllrhclk_prescaler: HclkPrescalerapb1_prescaler: ApbPrescalerapb2_prescaler: ApbPrescalerclk48_src: Clk48Srcsai1_enabled: boolsai2_enabled: boolhse_bypass: boolsecurity_system: boolhsi48_on: bool

Implementations

impl Clocks[src]

pub fn setup(&self, rcc: &mut RCC, flash: &mut FLASH) -> Result<(), SpeedError>[src]

Setup common and return a Valid status if the config is valid. Return Invalid, and don’t setup if not. https://docs.rs/stm32f3xx-hal/0.5.0/stm32f3xx_hal/rcc/struct.CFGR.html Use the STM32CubeIDE Clock Configuration tab to help.

pub fn hse_preset() -> Self[src]

This preset configures common with a 8Mhz HSE, a 80Mhz sysclck. All peripheral clocks are at 80Mhz. HSE output is not bypassed.

Trait Implementations

impl ClockCfg for Clocks[src]

impl Default for Clocks[src]

fn default() -> Self[src]

This default configures common with a HSI, a 80Mhz sysclck (l4/5). All peripheral clocks are at 80Mhz (l4/5). 168Mhz for G4.

Auto Trait Implementations

impl Send for Clocks

impl Sync for Clocks

impl Unpin for Clocks

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.