Struct stm32f4xx_hal::rcc::CFGR
source · [−]pub struct CFGR { /* private fields */ }
Implementations
sourceimpl CFGR
impl CFGR
sourcepub fn use_hse(self, freq: Hertz) -> Self
pub fn use_hse(self, freq: Hertz) -> Self
Uses HSE (external oscillator) instead of HSI (internal RC oscillator) as the clock source. Will result in a hang if an external oscillator is not connected or it fails to start.
sourcepub fn bypass_hse_oscillator(self) -> Self
pub fn bypass_hse_oscillator(self) -> Self
Bypasses the high-speed external oscillator and uses an external clock input on the OSC_IN pin.
For this configuration, the OSC_IN pin should be connected to a clock source with a frequency specified in the call to use_hse(), and the OSC_OUT pin should not be connected.
This function has no effect unless use_hse() is also called.
pub fn hclk(self, freq: Hertz) -> Self
pub fn pclk1(self, freq: Hertz) -> Self
pub fn pclk2(self, freq: Hertz) -> Self
pub fn sysclk(self, freq: Hertz) -> Self
pub fn require_pll48clk(self) -> Self
sourcepub fn i2s_ckin(self, freq: Hertz) -> Self
pub fn i2s_ckin(self, freq: Hertz) -> Self
Declares that the selected frequency is available at the I2S clock input pin (I2S_CKIN).
If this frequency matches the requested SAI or I2S frequencies, the external I2S clock is used to generate the clocks.
sourcepub fn i2s_clk(self, freq: Hertz) -> Self
pub fn i2s_clk(self, freq: Hertz) -> Self
Selects an I2S clock frequency and enables the I2S clock.
sourcepub fn saia_clk(self, freq: Hertz) -> Self
pub fn saia_clk(self, freq: Hertz) -> Self
Selects a SAIA clock frequency and enables the SAIA clock.
sourcepub fn saib_clk(self, freq: Hertz) -> Self
pub fn saib_clk(self, freq: Hertz) -> Self
Selects a SAIB clock frequency and enables the SAIB clock.
sourcepub fn freeze(self) -> Clocks
pub fn freeze(self) -> Clocks
Initialises the hardware according to CFGR state returning a Clocks instance. Panics if overclocking is attempted.
sourcepub unsafe fn freeze_unchecked(self) -> Clocks
pub unsafe fn freeze_unchecked(self) -> Clocks
Initialises the hardware according to CFGR state returning a Clocks instance. Allows overclocking.
Safety
This method does not check if the clocks are bigger or smaller than the officially recommended.
Auto Trait Implementations
impl RefUnwindSafe for CFGR
impl Send for CFGR
impl Sync for CFGR
impl Unpin for CFGR
impl UnwindSafe for CFGR
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more