pub struct TimerCounter<TC> { /* private fields */ }
Expand description

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

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.

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.

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.

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

The unit of time used by this timer
Starts a new count down
Non-blockingly “waits” until the count down finishes Read more

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.

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.