Using modify() to clear specific bits instead of a blanket 0 on all bits.

This commit is contained in:
Nic0w 2021-04-29 20:02:36 +02:00
parent 5726bef879
commit eb376cf47b

View file

@ -199,10 +199,9 @@ impl<D: PhaseLockedLoopDevice> PhaseLockedLoop<Disabled, D> {
}); });
// Turn on self.device // Turn on self.device
self.device.pwr.write(|w| unsafe { self.device.pwr.modify(|_,w| {
//w.pd().clear_bit(); w.pd().clear_bit();
//w.vcopd().clear_bit(); w.vcopd().clear_bit();
w.bits(0);
w w
}); });
@ -245,9 +244,8 @@ impl<D: PhaseLockedLoopDevice> PhaseLockedLoop<Locking, D> {
}); });
// Turn on post divider // Turn on post divider
self.device.pwr.write(|w| unsafe { self.device.pwr.modify(|_,w| {
//w.postdivpd().clear_bit(); w.postdivpd().clear_bit();
w.bits(0);
w w
}); });