diff --git a/embassy-rp/src/gpio.rs b/embassy-rp/src/gpio.rs index 203192827..b3a53d1b9 100644 --- a/embassy-rp/src/gpio.rs +++ b/embassy-rp/src/gpio.rs @@ -450,6 +450,16 @@ impl<'d> OutputOpenDrain<'d> { 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. #[inline] pub fn set_drive_strength(&mut self, strength: Drive) {