[][src]Struct esp32_hal::clock_control::ClockControlConfig

pub struct ClockControlConfig {}

Clock configuration & locking for Dynamic Frequency Switching. It allows thread and interrupt safe way to switch between default, high CPU and APB frequency configuration.

Implementations

impl<'a> ClockControlConfig[src]

pub fn cpu_frequency(&self) -> Hertz[src]

The current CPU frequency

pub fn apb_frequency(&self) -> Hertz[src]

The current APB frequency

pub fn cpu_frequency_default(&self) -> Hertz[src]

The CPU frequency in the default state

pub fn cpu_frequency_locked(&self) -> Hertz[src]

The CPU frequency in the CPU lock state

pub fn cpu_frequency_apb_locked(&self) -> Hertz[src]

The CPU frequency in the APB lock state

pub fn apb_frequency_apb_locked(&self) -> Hertz[src]

The APB frequency in the APB lock state

pub fn is_ref_clock_stable(&self) -> bool[src]

Is the reference clock 1MHz under all clock conditions

pub fn ref_frequency(&self) -> Hertz[src]

The current reference frequency

pub fn slow_rtc_frequency(&self) -> Hertz[src]

The current slow RTC frequency

pub fn fast_rtc_frequency(&self) -> Hertz[src]

The current fast RTC frequency

pub fn apll_frequency(&self) -> Hertz[src]

The current APLL frequency

pub fn pll_d2_frequency(&self) -> Hertz[src]

The current PLL/2 frequency

pub fn xtal_frequency(&self) -> Hertz[src]

The Xtal frequency

pub fn xtal32k_frequency(&self) -> Hertz[src]

The 32kHz Xtal frequency

pub fn pll_frequency(&self) -> Hertz[src]

The current PLL frequency

pub fn rtc8m_frequency(&self) -> Hertz[src]

The current 8MHz oscillator frequency

pub fn rtc8md256_frequency(&self) -> Hertz[src]

The current 8MHz oscillator frequency / 256

pub fn rtc_frequency(&self) -> Hertz[src]

The current 150kHz oscillator frequency

pub fn cpu_source(&self) -> CPUSource[src]

The current source for the CPU and APB frequencies

pub fn slow_rtc_source(&self) -> SlowRTCSource[src]

The current source for the slow RTC frequency

pub fn fast_rtc_source(&self) -> FastRTCSource[src]

The current source for the fast RTC frequency

pub fn lock_cpu_frequency(&self) -> LockCPU[src]

Obtain a RAII lock to use the high CPU frequency

pub fn lock_apb_frequency(&self) -> LockAPB[src]

Obtain a RAII lock to use the APB CPU frequency

pub fn lock_awake(&self) -> LockAwake[src]

Obtain a RAII lock to keep the CPU from sleeping

pub fn lock_plld2(&self) -> LockPllD2[src]

Obtain a RAII lock to keep the PLL/2 from being turned off

pub fn add_callback<F>(&self, f: &'static F) -> Result<(), Error> where
    F: Fn(CPUSource, Hertz, Hertz, CPUSource, Hertz, Hertz), 
[src]

Add callback which will be called when clock speeds are changed.

NOTE: these callbacks are called in an interrupt free environment, so should be as short as possible

pub fn get_lock_count(&self) -> Locks[src]

Get the current count of the PCU, APB, Awake and PLL/2 locks

pub unsafe fn park_core(&mut self, core: Core)[src]

Halt the designated core

pub fn unpark_core(&mut self, core: Core)[src]

Start the APP (second) core

The second core will start running with the function entry.

pub fn start_app_core(&mut self, entry: fn() -> !) -> Result<(), Error>[src]

Start the APP (second) core

The second core will start running with the function entry.

pub fn rtc_tick_count(&self) -> TicksU64[src]

Get RTC tick count since boot

Note: this function takes up to one slow RTC clock cycle (can be up to 300us) and interrupts are blocked during this time.

pub fn rtc_nanoseconds(&self) -> NanoSecondsU64[src]

Get nanoseconds since boot based on RTC tick count

Note: this function takes up to one slow RTC clock cycle (can be up to 300us) and interrupts are blocked during this time.

Trait Implementations

impl Clone for ClockControlConfig[src]

impl Copy for ClockControlConfig[src]

impl Debug for ClockControlConfig[src]

Auto Trait Implementations

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, 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.