Clear unused pulls in set_pull.
This commit is contained in:
parent
cd59046e6c
commit
488e322478
@ -476,11 +476,13 @@ impl<'d, T: Pin> Flex<'d, T> {
|
|||||||
unsafe {
|
unsafe {
|
||||||
self.pin.pad_ctrl().modify(|w| {
|
self.pin.pad_ctrl().modify(|w| {
|
||||||
w.set_ie(true);
|
w.set_ie(true);
|
||||||
match pull {
|
let (pu, pd) = match pull {
|
||||||
Pull::Up => w.set_pue(true),
|
Pull::Up => (true, false),
|
||||||
Pull::Down => w.set_pde(true),
|
Pull::Down => (false, true),
|
||||||
Pull::None => {}
|
Pull::None => (false, false),
|
||||||
}
|
};
|
||||||
|
w.set_pue(pu);
|
||||||
|
w.set_pde(pd);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user