pub struct Config { /* private fields */ }
Implementations§
Source§impl Config
impl Config
pub const DEFAULT: Self
pub fn hsi() -> Self
pub fn hse(freq: Hertz) -> Self
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
Trait Implementations§
impl Copy for Config
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