Clock

Trait Clock 

Source
pub trait Clock: Sized + Sealed {
    type Variant;

    // Required methods
    fn freq(&self) -> Rate<u32, 1, 1>;
    fn configure_clock<S>(
        &mut self,
        src: &S,
        freq: Rate<u32, 1, 1>,
    ) -> Result<(), ClockError>
       where S: ValidSrc<Self>;
}
Expand description

For clocks

Required Associated Types§

Source

type Variant

Enum with valid source clocks register values for Clock

Required Methods§

Source

fn freq(&self) -> Rate<u32, 1, 1>

Get operating frequency

Source

fn configure_clock<S>( &mut self, src: &S, freq: Rate<u32, 1, 1>, ) -> Result<(), ClockError>
where S: ValidSrc<Self>,

Configure this clock based on a clock source and desired frequency

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§