stm32/timer: add low_level::Timer::get_clock_frequency()
This commit is contained in:
parent
45a2abc392
commit
7b3939ca80
1 changed files with 5 additions and 0 deletions
|
@ -321,6 +321,11 @@ impl<'d, T: CoreInstance> Timer<'d, T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the clock frequency of the timer (before prescaler is applied).
|
||||
pub fn get_clock_frequency(&self) -> Hertz {
|
||||
T::frequency()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'d, T: BasicNoCr2Instance> Timer<'d, T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue