STM32: combine RccPeripherals reset() and enable() to reset_and_enable()

This commit is contained in:
pbert
2023-10-11 18:06:43 +02:00
parent eb368f77a4
commit f65a96c541
37 changed files with 105 additions and 154 deletions

View File

@ -73,8 +73,7 @@ impl<'d, T: CaptureCompare32bitInstance> SimplePwm32<'d, T> {
) -> Self {
into_ref!(tim, ch1, ch2, ch3, ch4);
T::enable();
<T as embassy_stm32::rcc::low_level::RccPeripheral>::reset();
T::reset_and_enable();
ch1.set_speed(Speed::VeryHigh);
ch1.set_as_af(ch1.af_num(), AFType::OutputPushPull);