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 {
|
||||
self.pin.pad_ctrl().modify(|w| {
|
||||
w.set_ie(true);
|
||||
match pull {
|
||||
Pull::Up => w.set_pue(true),
|
||||
Pull::Down => w.set_pde(true),
|
||||
Pull::None => {}
|
||||
}
|
||||
let (pu, pd) = match pull {
|
||||
Pull::Up => (true, false),
|
||||
Pull::Down => (false, true),
|
||||
Pull::None => (false, false),
|
||||
};
|
||||
w.set_pue(pu);
|
||||
w.set_pde(pd);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user