stm32: Make sure Output gpio driver is pushpull

This commit is contained in:
Thales Fragoso 2021-06-27 13:25:35 -03:00
parent 0eaadfc125
commit c5022b1196

View file

@ -131,6 +131,7 @@ impl<'d, T: Pin> Output<'d, T> {
let n = pin.pin() as usize; let n = pin.pin() as usize;
r.pupdr().modify(|w| w.set_pupdr(n, vals::Pupdr::FLOATING)); r.pupdr().modify(|w| w.set_pupdr(n, vals::Pupdr::FLOATING));
r.moder().modify(|w| w.set_moder(n, vals::Moder::OUTPUT)); r.moder().modify(|w| w.set_moder(n, vals::Moder::OUTPUT));
r.otyper().modify(|w| w.set_ot(n, vals::Ot::PUSHPULL));
pin.set_speed(speed); pin.set_speed(speed);
}); });