[][src]Struct msp430fr2x5x_hal::clock::ClockConfig

pub struct ClockConfig<MCLK, SMCLK> { /* fields omitted */ }

Builder object that configures system clocks

Can only commit configurations to hardware if both MCLK and SMCLK settings have been configured. ACLK configurations are optional, with its default source being REFOCLK.

Implementations

impl ClockConfig<NoClockDefined, NoClockDefined>[src]

pub fn new(cs: CS) -> Self[src]

Converts CS into a fresh, unconfigured clock builder object

impl<MCLK, SMCLK> ClockConfig<MCLK, SMCLK>[src]

pub fn aclk_refoclk(self) -> Self[src]

Select REFOCLK for ACLK

pub fn aclk_vloclk(self) -> Self[src]

Select VLOCLK for ACLK

pub fn mclk_refoclk(self, mclk_div: MclkDiv) -> ClockConfig<MclkDefined, SMCLK>[src]

Select REFOCLK for MCLK and set the MCLK divider. Frequency is 10000 / mclk_div Hz.

pub fn mclk_vcoclk(self, mclk_div: MclkDiv) -> ClockConfig<MclkDefined, SMCLK>[src]

Select VLOCLK for MCLK and set the MCLK divider. Frequency is 32768 / mclk_div Hz.

pub fn mclk_dcoclk(
    self,
    target_freq: DcoclkFreqSel,
    mclk_div: MclkDiv
) -> ClockConfig<MclkDefined, SMCLK>
[src]

Select DCOCLK for MCLK with FLL for stabilization. Frequency is target_freq / mclk_div Hz. This setting selects the default factory trim for DCO trimming and performs no extra calibration, so only a select few frequency targets can be selected.

pub fn smclk_on(self, div: SmclkDiv) -> ClockConfig<MCLK, SmclkDefined>[src]

Enable SMCLK and set SMCLK divider, which divides the MCLK frequency

pub fn smclk_off(self) -> ClockConfig<MCLK, SmclkDisabled>[src]

Disable SMCLK

impl ClockConfig<MclkDefined, SmclkDefined>[src]

pub fn freeze(self, fram: &mut Fram) -> (Smclk, Aclk)[src]

Apply clock configuration to hardware and return SMCLK and ACLK clock objects

impl ClockConfig<MclkDefined, SmclkDisabled>[src]

pub fn freeze(self, fram: &mut Fram) -> Aclk[src]

Apply clock configuration to hardware and return ACLK clock object, as SMCLK is disabled

Auto Trait Implementations

impl<MCLK, SMCLK> Send for ClockConfig<MCLK, SMCLK> where
    MCLK: Send,
    SMCLK: Send
[src]

impl<MCLK, SMCLK> !Sync for ClockConfig<MCLK, SMCLK>[src]

impl<MCLK, SMCLK> Unpin for ClockConfig<MCLK, SMCLK> where
    MCLK: Unpin,
    SMCLK: Unpin
[src]

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.