Trait TimerIFace

Source
pub trait TimerIFace<S: TimerSpeed> {
    // Required methods
    fn freq(&self) -> Option<Rate>;
    fn configure(
        &mut self,
        config: Config<S::ClockSourceType>,
    ) -> Result<(), Error>;
    fn is_configured(&self) -> bool;
    fn duty(&self) -> Option<Duty>;
    fn number(&self) -> Number;
    fn frequency(&self) -> u32;
}
Available on crate feature unstable only.
Expand description

Interface for Timers

Required Methods§

Source

fn freq(&self) -> Option<Rate>

Return the frequency of the timer

Source

fn configure(&mut self, config: Config<S::ClockSourceType>) -> Result<(), Error>

Configure the timer

Source

fn is_configured(&self) -> bool

Check if the timer has been configured

Source

fn duty(&self) -> Option<Duty>

Return the duty resolution of the timer

Source

fn number(&self) -> Number

Return the timer number

Source

fn frequency(&self) -> u32

Return the timer frequency, or 0 if not configured

Implementors§

Source§

impl<'a, S: TimerSpeed> TimerIFace<S> for Timer<'a, S>
where Timer<'a, S>: TimerHW<S>,