nrf/pwm: set initial value to Low, according to the PS

This commit is contained in:
Dario Nieuwenhuis 2021-05-15 00:02:35 +02:00
parent f9bcf6df6b
commit 88f664b434

View file

@ -53,19 +53,19 @@ impl<'d, T: Instance> Pwm<'d, T> {
let s = T::state();
if let Some(pin) = ch0.pin_mut() {
pin.set_high();
pin.set_low();
pin.conf().write(|w| w.dir().output());
}
if let Some(pin) = ch1.pin_mut() {
pin.set_high();
pin.set_low();
pin.conf().write(|w| w.dir().output());
}
if let Some(pin) = ch2.pin_mut() {
pin.set_high();
pin.set_low();
pin.conf().write(|w| w.dir().output());
}
if let Some(pin) = ch3.pin_mut() {
pin.set_high();
pin.set_low();
pin.conf().write(|w| w.dir().output());
}
r.psel.out[0].write(|w| unsafe { w.bits(ch0.psel_bits()) });