Skip to main content

Osc

Struct Osc 

Source
pub struct Osc { /* private fields */ }

Implementations§

Source§

impl Osc

Source

pub const fn new(osc: OSC, sysclock: Hertz) -> Osc

Create a new Osc from a possibly constant sysclock value. The sysclock value should be set to the core clock resulting from the configuration words and, if a crystal oscillator is used, the crystal frequency.

Source

pub const fn new_with_refclock(osc: OSC, sysclock: Hertz) -> (Osc, Refclock)

Create a new Osc and Refclock from a possibly constant sysclock value. The sysclock value should be set to the core clock resulting from the configuration words and, if a crystal oscillator is used, the crystal frequency.

Source

pub fn sysclock(&self) -> Hertz

Get the sysclock

Source

pub fn pb_clock(&self) -> Hertz

Determine the peripheral clock frequency based on the sysclock value and the peripheral clock divider setting

Auto Trait Implementations§

§

impl !Sync for Osc

§

impl Freeze for Osc

§

impl RefUnwindSafe for Osc

§

impl Send for Osc

§

impl Unpin for Osc

§

impl UnsafeUnpin for Osc

§

impl UnwindSafe for Osc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.