[−][src]Struct arduino_mkrzero::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.
Implementations
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> CountDown for TimerCounter<TC> where
TC: Count16,
[src]
TC: Count16,
type Time = Nanoseconds
The unit of time used by this timer
pub fn start<T>(&mut self, timeout: T) where
T: Into<<TimerCounter<TC> as CountDown>::Time>,
[src]
T: Into<<TimerCounter<TC> as CountDown>::Time>,
pub fn wait(&mut self) -> Result<(), Error<Void>>
[src]
impl<TC> InterruptDrivenTimer for 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<TC> Periodic for TimerCounter<TC>
[src]
Auto Trait Implementations
impl<TC> Send for TimerCounter<TC> where
TC: Send,
[src]
TC: Send,
impl<TC> Sync for TimerCounter<TC> where
TC: Sync,
[src]
TC: Sync,
impl<TC> Unpin for TimerCounter<TC> where
TC: Unpin,
[src]
TC: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,