STM32: combine RccPeripherals reset() and enable() to reset_and_enable()
This commit is contained in:
@ -63,8 +63,7 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> {
|
||||
fn new_inner(tim: impl Peripheral<P = T> + 'd, freq: Hertz) -> Self {
|
||||
into_ref!(tim);
|
||||
|
||||
T::enable();
|
||||
<T as crate::rcc::sealed::RccPeripheral>::reset();
|
||||
T::reset_and_enable();
|
||||
|
||||
let mut this = Self { inner: tim };
|
||||
|
||||
|
Reference in New Issue
Block a user