diff options
| author | Liu Hancheng <[email protected]> | 2025-01-01 17:05:48 +0800 |
|---|---|---|
| committer | Liu Hancheng <[email protected]> | 2025-01-01 17:05:48 +0800 |
| commit | cbc7a9fe5b9bfda8a53316cd231d6a4b7a3bbfd9 (patch) | |
| tree | ea385395fe9f8ac1abbeef0e22c3d5aacf0cbe69 /embassy-stm32/src/timer/low_level.rs | |
| parent | 667dfa34b525f727936d621ba91001fa25d80426 (diff) | |
feat: Add 32-bit timer support for waveform function
Diffstat (limited to 'embassy-stm32/src/timer/low_level.rs')
| -rw-r--r-- | embassy-stm32/src/timer/low_level.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs index 7360d6aef..448069ab3 100644 --- a/embassy-stm32/src/timer/low_level.rs +++ b/embassy-stm32/src/timer/low_level.rs | |||
| @@ -235,6 +235,10 @@ impl<'d, T: CoreInstance> Timer<'d, T> { | |||
| 235 | self.regs_core().cnt().write(|r| r.set_cnt(0)); | 235 | self.regs_core().cnt().write(|r| r.set_cnt(0)); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | pub fn get_bits(&self) -> TimerBits { | ||
| 239 | T::BITS | ||
| 240 | } | ||
| 241 | |||
| 238 | /// Set the frequency of how many times per second the timer counts up to the max value or down to 0. | 242 | /// Set the frequency of how many times per second the timer counts up to the max value or down to 0. |
| 239 | /// | 243 | /// |
| 240 | /// This means that in the default edge-aligned mode, | 244 | /// This means that in the default edge-aligned mode, |
