std :: hal::timer
Struct std::Timer
generic<C: TimerChip> struct Timer {
&volatile unsigned int base;
unsigned int prescaler;
C chip;
}Fields
MMIO base address
clock divider
Methods
Initialize a hardware timer at base with the given prescaler (STM32: the
counter runs at clock / (prescaler + 1)). The chip type comes from the target.
Set the auto-reload (period) value.
Start the timer.
Stop the timer.
Read the current counter value.
Clear the interrupt/overflow flag.
Check if the overflow/compare flag is set. Returns 1 if set.