[][src]Trait msp430fr2x5x_hal::clock::Clock

pub trait Clock {
    type Freq;
    pub fn freq(&self) -> Self::Freq;
}

Trait for configured clock objects

Associated Types

type Freq[src]

Type of the returned frequency value

Loading content...

Required methods

pub fn freq(&self) -> Self::Freq[src]

Frequency of the clock

Loading content...

Implementors

impl Clock for Aclk[src]

type Freq = u16

impl Clock for Smclk[src]

type Freq = u32

pub fn freq(&self) -> u32[src]

Returning a 32-bit frequency may seem suspect, since we're on a 16-bit system, but it is required as SMCLK can go up to 24 MHz. Clock frequencies are usually for initialization tasks such as computing baud rates, which should be optimized away, avoiding the extra cost of 32-bit computations.

Loading content...