mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-02-02 14:36:34 +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 => (),
|
||||
PullDown => {
|
||||
fields.pde = true;
|
||||
fields.pue = false;
|
||||
}
|
||||
PullUp => {
|
||||
fields.pue = true;
|
||||
fields.pde = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +56,11 @@ impl From<DynPinMode> for ModeFields {
|
|||
Floating => (),
|
||||
PullDown => {
|
||||
fields.pde = true;
|
||||
fields.pue = false;
|
||||
}
|
||||
PullUp => {
|
||||
fields.pue = true;
|
||||
fields.pde = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue