[−][src]Struct itsybitsy_m0::timer::TimerCounter
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]
TC: Count16,
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]
TC: Count16,
Auto Trait Implementations
impl<TC> Send for TimerCounter<TC> where
TC: Send,
TC: Send,
impl<TC> Sync for TimerCounter<TC> where
TC: Sync,
TC: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,