nrf: pwm use register reset
This commit is contained in:
parent
7dfc0acb2f
commit
3a166db280
@ -336,23 +336,23 @@ impl<'a, T: Instance> Drop for SequencePwm<'a, T> {
|
|||||||
|
|
||||||
if let Some(pin) = &self.ch0 {
|
if let Some(pin) = &self.ch0 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[0].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[0].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch1 {
|
if let Some(pin) = &self.ch1 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[1].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[1].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch2 {
|
if let Some(pin) = &self.ch2 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[2].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[2].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch3 {
|
if let Some(pin) = &self.ch3 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[3].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[3].reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -616,23 +616,23 @@ impl<'a, T: Instance> Drop for SimplePwm<'a, T> {
|
|||||||
|
|
||||||
if let Some(pin) = &self.ch0 {
|
if let Some(pin) = &self.ch0 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[0].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[0].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch1 {
|
if let Some(pin) = &self.ch1 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[1].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[1].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch2 {
|
if let Some(pin) = &self.ch2 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[2].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[2].reset();
|
||||||
}
|
}
|
||||||
if let Some(pin) = &self.ch3 {
|
if let Some(pin) = &self.ch3 {
|
||||||
pin.set_low();
|
pin.set_low();
|
||||||
pin.conf().write(|w| w);
|
pin.conf().reset();
|
||||||
r.psel.out[3].write(|w| unsafe { w.bits(0x80000000) });
|
r.psel.out[3].reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user