[][src]Struct trinket_m0::timer::TimerCounter

pub struct TimerCounter<TC> { /* fields omitted */ }

A generic hardware timer counter. The counters are exposed in 16-bit mode only. The hardware allows configuring the 8-bit mode and pairing up some instances to run in 32-bit mode, but that functionality is not currently exposed by this hal implementation. TimerCounter implements both the Periodic and the CountDown embedded_hal timer traits. Before a hardware timer can be used, it must first have a clock configured.

Methods

impl<TC> TimerCounter<TC> where
    TC: Count16
[src]

pub fn enable_interrupt(&mut self)[src]

Enable the interrupt generation for this hardware timer. This method only sets the clock configuration to trigger the interrupt; it does not configure the interrupt controller or define an interrupt handler.

pub fn disable_interrupt(&mut self)[src]

Disables interrupt generation for this hardware timer. This method only sets the clock configuration to prevent triggering the interrupt; it does not configure the interrupt controller.

impl TimerCounter<TC3>[src]

pub fn tc3_(clock: &Tcc2Tc3Clock, tc: TC3, pm: &mut PM) -> TimerCounter<TC3>[src]

Configure this timer counter instance. The clock is obtained from the GenericClockController instance and its frequency impacts the resolution and maximum range of the timeout values that can be passed to the start method. Note that some hardware timer instances share the same clock generator instance and thus will be clocked at the same rate.

impl TimerCounter<TC4>[src]

pub fn tc4_(clock: &Tc4Tc5Clock, tc: TC4, pm: &mut PM) -> TimerCounter<TC4>[src]

Configure this timer counter instance. The clock is obtained from the GenericClockController instance and its frequency impacts the resolution and maximum range of the timeout values that can be passed to the start method. Note that some hardware timer instances share the same clock generator instance and thus will be clocked at the same rate.

impl TimerCounter<TC5>[src]

pub fn tc5_(clock: &Tc4Tc5Clock, tc: TC5, pm: &mut PM) -> TimerCounter<TC5>[src]

Configure this timer counter instance. The clock is obtained from the GenericClockController instance and its frequency impacts the resolution and maximum range of the timeout values that can be passed to the start method. Note that some hardware timer instances share the same clock generator instance and thus will be clocked at the same rate.

Trait Implementations

impl<TC> Periodic for TimerCounter<TC>[src]

impl<TC> CountDown for TimerCounter<TC> where
    TC: Count16
[src]

type Time = Hertz

The unit of time used by this timer

Auto Trait Implementations

impl<TC> Send for TimerCounter<TC> where
    TC: Send

impl<TC> Sync for TimerCounter<TC> where
    TC: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]