mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-02-23 23:57:43 +11:00
Ensure only pull-up or pull-down is enabled
This commit is contained in:
parent
e00a432ed5
commit
31b9aa85d1
1 changed files with 4 additions and 0 deletions
|
@ -38,9 +38,11 @@ impl From<DynPinMode> for ModeFields {
|
||||||
Floating => (),
|
Floating => (),
|
||||||
PullDown => {
|
PullDown => {
|
||||||
fields.pde = true;
|
fields.pde = true;
|
||||||
|
fields.pue = false;
|
||||||
}
|
}
|
||||||
PullUp => {
|
PullUp => {
|
||||||
fields.pue = true;
|
fields.pue = true;
|
||||||
|
fields.pde = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,9 +56,11 @@ impl From<DynPinMode> for ModeFields {
|
||||||
Floating => (),
|
Floating => (),
|
||||||
PullDown => {
|
PullDown => {
|
||||||
fields.pde = true;
|
fields.pde = true;
|
||||||
|
fields.pue = false;
|
||||||
}
|
}
|
||||||
PullUp => {
|
PullUp => {
|
||||||
fields.pue = true;
|
fields.pue = true;
|
||||||
|
fields.pde = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue