Merge pull request #3730 from Georges760/rp-gpio-ood-pu
`embassy-rp`: add `set_pullup()` for `OutputOpenDrain`
This commit is contained in:
commit
b33949e5ab
@ -450,6 +450,16 @@ impl<'d> OutputOpenDrain<'d> {
|
|||||||
Self { pin }
|
Self { pin }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set the pin's pull-up.
|
||||||
|
#[inline]
|
||||||
|
pub fn set_pullup(&mut self, enable: bool) {
|
||||||
|
if enable {
|
||||||
|
self.pin.set_pull(Pull::Up);
|
||||||
|
} else {
|
||||||
|
self.pin.set_pull(Pull::None);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the pin's drive strength.
|
/// Set the pin's drive strength.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_drive_strength(&mut self, strength: Drive) {
|
pub fn set_drive_strength(&mut self, strength: Drive) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user