diff options
| author | pbert <[email protected]> | 2023-10-11 18:06:43 +0200 |
|---|---|---|
| committer | pbert <[email protected]> | 2023-10-12 11:04:19 +0200 |
| commit | f65a96c54146179f76a7a2a784c5bb89590e5de1 (patch) | |
| tree | 21b20805229d639f16f035a64f94cb896a636cd0 /examples/stm32h7/src/bin/low_level_timer_api.rs | |
| parent | eb368f77a46682f76dcc4d75f9ba4ce80dfb4193 (diff) | |
STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
Diffstat (limited to 'examples/stm32h7/src/bin/low_level_timer_api.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/low_level_timer_api.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs index f4fa06909..757ee3286 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs | |||
| @@ -73,8 +73,7 @@ impl<'d, T: CaptureCompare32bitInstance> SimplePwm32<'d, T> { | |||
| 73 | ) -> Self { | 73 | ) -> Self { |
| 74 | into_ref!(tim, ch1, ch2, ch3, ch4); | 74 | into_ref!(tim, ch1, ch2, ch3, ch4); |
| 75 | 75 | ||
| 76 | T::enable(); | 76 | T::reset_and_enable(); |
| 77 | <T as embassy_stm32::rcc::low_level::RccPeripheral>::reset(); | ||
| 78 | 77 | ||
| 79 | ch1.set_speed(Speed::VeryHigh); | 78 | ch1.set_speed(Speed::VeryHigh); |
| 80 | ch1.set_as_af(ch1.af_num(), AFType::OutputPushPull); | 79 | ch1.set_as_af(ch1.af_num(), AFType::OutputPushPull); |
