embassy-rp: add set_pullup() for OutputOpenDrain
This commit is contained in:
parent
953288f5c8
commit
3c87bb588b
@ -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