aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/timer/low_level.rs
diff options
context:
space:
mode:
authorJan Špaček <[email protected]>2024-05-04 19:42:32 +0200
committerJan Špaček <[email protected]>2024-05-04 19:44:03 +0200
commit7b3939ca80f11f348bed4fcd2297a1e4ac07a7e8 (patch)
tree22cc4dbf545088f8394637749aa322b7d2385dda /embassy-stm32/src/timer/low_level.rs
parent45a2abc392df91ce6963ac0956f48f22bfa1489b (diff)
stm32/timer: add `low_level::Timer::get_clock_frequency()`
Diffstat (limited to 'embassy-stm32/src/timer/low_level.rs')
-rw-r--r--embassy-stm32/src/timer/low_level.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs
index 294dff7ea..aa73986ea 100644
--- a/embassy-stm32/src/timer/low_level.rs
+++ b/embassy-stm32/src/timer/low_level.rs
@@ -321,6 +321,11 @@ impl<'d, T: CoreInstance> Timer<'d, T> {
321 } 321 }
322 } 322 }
323 } 323 }
324
325 /// Get the clock frequency of the timer (before prescaler is applied).
326 pub fn get_clock_frequency(&self) -> Hertz {
327 T::frequency()
328 }
324} 329}
325 330
326impl<'d, T: BasicNoCr2Instance> Timer<'d, T> { 331impl<'d, T: BasicNoCr2Instance> Timer<'d, T> {