pub struct ClocksManager {
pub gpio_output0_clock: GpioOutput0Clock,
pub gpio_output1_clock: GpioOutput1Clock,
pub gpio_output2_clock: GpioOutput2Clock,
pub gpio_output3_clock: GpioOutput3Clock,
pub reference_clock: ReferenceClock,
pub system_clock: SystemClock,
pub peripheral_clock: PeripheralClock,
pub hstx_clock: HstxClock,
pub usb_clock: UsbClock,
pub adc_clock: AdcClock,
/* private fields */
}Expand description
Abstraction layer providing Clock Management.
Fields§
§gpio_output0_clock: GpioOutput0ClockGpioOutput0Clock field
gpio_output1_clock: GpioOutput1ClockGpioOutput1Clock field
gpio_output2_clock: GpioOutput2ClockGpioOutput2Clock field
gpio_output3_clock: GpioOutput3ClockGpioOutput3Clock field
reference_clock: ReferenceClockReferenceClock field
system_clock: SystemClockSystemClock field
peripheral_clock: PeripheralClockPeripheralClock field
hstx_clock: HstxClockHstxClock field
usb_clock: UsbClockUsbClock field
adc_clock: AdcClockAdcClock field
Implementations§
Source§impl ClocksManager
impl ClocksManager
Sourcepub fn new(clocks_block: CLOCKS) -> ClocksManager
pub fn new(clocks_block: CLOCKS) -> ClocksManager
Exchanges CLOCKS block against Self.
Source§impl ClocksManager
impl ClocksManager
Sourcepub fn init_default(
&mut self,
xosc: &CrystalOscillator<Stable>,
pll_sys: &PhaseLockedLoop<Locked, PLL_SYS>,
pll_usb: &PhaseLockedLoop<Locked, PLL_USB>,
) -> Result<(), ClockError>
pub fn init_default( &mut self, xosc: &CrystalOscillator<Stable>, pll_sys: &PhaseLockedLoop<Locked, PLL_SYS>, pll_usb: &PhaseLockedLoop<Locked, PLL_USB>, ) -> Result<(), ClockError>
Initialize the clocks to a sane default
Sourcepub fn configure_sleep_enable(&mut self, clock_gate: ClockGate)
pub fn configure_sleep_enable(&mut self, clock_gate: ClockGate)
Configure the clocks staying ON during deep-sleep.
Sourcepub fn sleep_enable(&self) -> ClockGate
pub fn sleep_enable(&self) -> ClockGate
Read the clock gate configuration while the device is in its (deep) sleep state.
Sourcepub fn wake_enable(&self) -> ClockGate
pub fn wake_enable(&self) -> ClockGate
Read the clock gate configuration while the device is in its wake state.
Auto Trait Implementations§
impl Freeze for ClocksManager
impl RefUnwindSafe for ClocksManager
impl Send for ClocksManager
impl !Sync for ClocksManager
impl Unpin for ClocksManager
impl UnwindSafe for ClocksManager
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
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more