pub struct Rcc {
pub clocks: Clocks,
/* private fields */
}Expand description
Constrained RCC peripheral
Aquired by calling the constrain method
on the Rcc struct from the PAC
let dp = pac::Peripherals::take().unwrap();
let mut rcc = dp.RCC.constrain();Fields§
§clocks: ClocksImplementations§
Source§impl Rcc
impl Rcc
Sourcepub fn freeze(self, cfg: impl Into<RawConfig>, acr: &mut ACR) -> Self
pub fn freeze(self, cfg: impl Into<RawConfig>, acr: &mut ACR) -> Self
Applies the clock configuration and returns a Clocks struct that signifies that the
clocks are frozen, and contains the frequencies used. After this function is called,
the clocks can not change
Usage:
let dp = pac::Peripherals::take().unwrap();
let mut flash = dp.FLASH.constrain();
let cfg = rcc::Config::hse(8.MHz()).sysclk(72.MHz());
let mut rcc = dp.RCC.constrain().freeze(cfg, &mut flash.acr);pub fn enable<T: Enable>(&mut self, _periph: &T)
pub fn reset<T: Reset>(&mut self, _periph: &T)
pub fn get_clock<T: BusClock>(&self, _periph: &T) -> Hertz
pub fn get_timer_clock<T: BusTimerClock>(&self, _periph: &T) -> Hertz
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rcc
impl !RefUnwindSafe for Rcc
impl Send for Rcc
impl !Sync for Rcc
impl Unpin for Rcc
impl UnwindSafe for Rcc
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