mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
Merge pull request #432 from jannic/fix-set_pindirs
Temporarily disable out_sticky in set_pindirs
This commit is contained in:
commit
00f5e8d184
|
@ -627,6 +627,11 @@ impl<SM: ValidStateMachine> StateMachine<SM, Stopped> {
|
||||||
// `UninitStateMachine` byt adding a program.
|
// `UninitStateMachine` byt adding a program.
|
||||||
pub fn set_pindirs(&mut self, pindirs: impl IntoIterator<Item = (u8, PinDir)>) {
|
pub fn set_pindirs(&mut self, pindirs: impl IntoIterator<Item = (u8, PinDir)>) {
|
||||||
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();
|
||||||
|
self.sm
|
||||||
|
.sm()
|
||||||
|
.sm_execctrl
|
||||||
|
.modify(|_, w| w.out_sticky().clear_bit());
|
||||||
for (pinnum, pin_dir) in pindirs {
|
for (pinnum, pin_dir) in pindirs {
|
||||||
self.sm
|
self.sm
|
||||||
.sm()
|
.sm()
|
||||||
|
@ -644,6 +649,10 @@ impl<SM: ValidStateMachine> StateMachine<SM, Stopped> {
|
||||||
.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
|
||||||
|
.write(|w| unsafe { w.bits(saved_execctrl.bits()) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue