mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
Using modify() to clear specific bits instead of a blanket 0 on all bits.
This commit is contained in:
parent
5726bef879
commit
eb376cf47b
|
@ -199,10 +199,9 @@ impl<D: PhaseLockedLoopDevice> PhaseLockedLoop<Disabled, D> {
|
|||
});
|
||||
|
||||
// Turn on self.device
|
||||
self.device.pwr.write(|w| unsafe {
|
||||
//w.pd().clear_bit();
|
||||
//w.vcopd().clear_bit();
|
||||
w.bits(0);
|
||||
self.device.pwr.modify(|_,w| {
|
||||
w.pd().clear_bit();
|
||||
w.vcopd().clear_bit();
|
||||
w
|
||||
});
|
||||
|
||||
|
@ -245,9 +244,8 @@ impl<D: PhaseLockedLoopDevice> PhaseLockedLoop<Locking, D> {
|
|||
});
|
||||
|
||||
// Turn on post divider
|
||||
self.device.pwr.write(|w| unsafe {
|
||||
//w.postdivpd().clear_bit();
|
||||
w.bits(0);
|
||||
self.device.pwr.modify(|_,w| {
|
||||
w.postdivpd().clear_bit();
|
||||
w
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue