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

@ -127,8 +127,7 @@ impl Prescaler {
impl<'d, T: Instance> Adc<'d, T> {
pub fn new(adc: impl Peripheral<P = T> + 'd, delay: &mut impl DelayUs<u16>) -> Self {
embassy_hal_internal::into_ref!(adc);
T::enable();
T::reset();
T::reset_and_enable();
let prescaler = Prescaler::from_ker_ck(T::frequency());