mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
Temporary disable sticky-bit in set_pins too (#433)
This commit is contained in:
parent
31469c232f
commit
dbc691fb09
|
@ -598,6 +598,7 @@ impl<SM: ValidStateMachine> StateMachine<SM, Stopped> {
|
||||||
// `UninitStateMachine` byt adding a program.
|
// `UninitStateMachine` byt adding a program.
|
||||||
pub fn set_pins(&mut self, pins: impl IntoIterator<Item = (u8, PinState)>) {
|
pub fn set_pins(&mut self, pins: impl IntoIterator<Item = (u8, PinState)>) {
|
||||||
let saved_ctrl = self.sm.sm().sm_pinctrl.read();
|
let saved_ctrl = self.sm.sm().sm_pinctrl.read();
|
||||||
|
let saved_execctrl = self.sm.sm().sm_execctrl.read();
|
||||||
for (pin_num, pin_state) in pins {
|
for (pin_num, pin_state) in pins {
|
||||||
self.sm
|
self.sm
|
||||||
.sm()
|
.sm()
|
||||||
|
@ -611,10 +612,11 @@ impl<SM: ValidStateMachine> StateMachine<SM, Stopped> {
|
||||||
.encode(),
|
.encode(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
self.sm
|
let sm = self.sm.sm();
|
||||||
.sm()
|
sm.sm_pinctrl
|
||||||
.sm_pinctrl
|
|
||||||
.write(|w| unsafe { w.bits(saved_ctrl.bits()) });
|
.write(|w| unsafe { w.bits(saved_ctrl.bits()) });
|
||||||
|
sm.sm_execctrl
|
||||||
|
.write(|w| unsafe { w.bits(saved_execctrl.bits()) })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set pin directions.
|
/// Set pin directions.
|
||||||
|
@ -645,13 +647,10 @@ impl<SM: ValidStateMachine> StateMachine<SM, Stopped> {
|
||||||
.encode(),
|
.encode(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
self.sm
|
let sm = self.sm.sm();
|
||||||
.sm()
|
sm.sm_pinctrl
|
||||||
.sm_pinctrl
|
|
||||||
.write(|w| unsafe { w.bits(saved_ctrl.bits()) });
|
.write(|w| unsafe { w.bits(saved_ctrl.bits()) });
|
||||||
self.sm
|
sm.sm_execctrl
|
||||||
.sm()
|
|
||||||
.sm_execctrl
|
|
||||||
.write(|w| unsafe { w.bits(saved_execctrl.bits()) });
|
.write(|w| unsafe { w.bits(saved_execctrl.bits()) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue