pub struct OutputOpenDrain<'d> { /* private fields */ }Expand description
GPIO output open-drain.
Implementations§
Source§impl<'d> OutputOpenDrain<'d>
impl<'d> OutputOpenDrain<'d>
Sourcepub fn set_pullup(&mut self, enable: bool)
pub fn set_pullup(&mut self, enable: bool)
Set the pin’s pull-up.
Sourcepub fn set_drive_strength(&mut self, strength: Drive)
pub fn set_drive_strength(&mut self, strength: Drive)
Set the pin’s drive strength.
Sourcepub fn set_slew_rate(&mut self, slew_rate: SlewRate)
pub fn set_slew_rate(&mut self, slew_rate: SlewRate)
Set the pin’s slew rate.
Sourcepub fn is_set_high(&self) -> bool
pub fn is_set_high(&self) -> bool
Is the output level high?
Sourcepub fn is_set_low(&self) -> bool
pub fn is_set_low(&self) -> bool
Is the output level low?
Sourcepub fn output_level(&self) -> Level
pub fn output_level(&self) -> Level
What level output is set to
Sourcepub async fn wait_for_high(&mut self)
pub async fn wait_for_high(&mut self)
Wait until the pin is high. If it is already high, return immediately.
Sourcepub async fn wait_for_low(&mut self)
pub async fn wait_for_low(&mut self)
Wait until the pin is low. If it is already low, return immediately.
Sourcepub async fn wait_for_rising_edge(&mut self)
pub async fn wait_for_rising_edge(&mut self)
Wait for the pin to undergo a transition from low to high.
Sourcepub async fn wait_for_falling_edge(&mut self)
pub async fn wait_for_falling_edge(&mut self)
Wait for the pin to undergo a transition from high to low.
Sourcepub async fn wait_for_any_edge(&mut self)
pub async fn wait_for_any_edge(&mut self)
Wait for the pin to undergo any transition, i.e low to high OR high to low.
Trait Implementations§
Source§impl<'d> Debug for OutputOpenDrain<'d>
impl<'d> Debug for OutputOpenDrain<'d>
Source§impl<'d> Format for OutputOpenDrain<'d>
impl<'d> Format for OutputOpenDrain<'d>
Source§impl<'d> InputPin for OutputOpenDrain<'d>
impl<'d> InputPin for OutputOpenDrain<'d>
Source§impl<'d> InputPin for OutputOpenDrain<'d>
impl<'d> InputPin for OutputOpenDrain<'d>
Source§impl<'d> OutputPin for OutputOpenDrain<'d>
impl<'d> OutputPin for OutputOpenDrain<'d>
Source§impl<'d> OutputPin for OutputOpenDrain<'d>
impl<'d> OutputPin for OutputOpenDrain<'d>
Source§impl<'d> StatefulOutputPin for OutputOpenDrain<'d>
impl<'d> StatefulOutputPin for OutputOpenDrain<'d>
Source§impl<'d> StatefulOutputPin for OutputOpenDrain<'d>
impl<'d> StatefulOutputPin for OutputOpenDrain<'d>
Source§impl<'d> ToggleableOutputPin for OutputOpenDrain<'d>
impl<'d> ToggleableOutputPin for OutputOpenDrain<'d>
Source§impl<'d> Wait for OutputOpenDrain<'d>
impl<'d> Wait for OutputOpenDrain<'d>
Source§async fn wait_for_high(&mut self) -> Result<(), Self::Error>
async fn wait_for_high(&mut self) -> Result<(), Self::Error>
Wait until the pin is high. If it is already high, return immediately. Read more
Source§async fn wait_for_low(&mut self) -> Result<(), Self::Error>
async fn wait_for_low(&mut self) -> Result<(), Self::Error>
Wait until the pin is low. If it is already low, return immediately. Read more
Source§async fn wait_for_rising_edge(&mut self) -> Result<(), Self::Error>
async fn wait_for_rising_edge(&mut self) -> Result<(), Self::Error>
Wait for the pin to undergo a transition from low to high. Read more
Auto Trait Implementations§
impl<'d> !UnwindSafe for OutputOpenDrain<'d>
impl<'d> Freeze for OutputOpenDrain<'d>
impl<'d> RefUnwindSafe for OutputOpenDrain<'d>
impl<'d> Send for OutputOpenDrain<'d>
impl<'d> Sync for OutputOpenDrain<'d>
impl<'d> Unpin for OutputOpenDrain<'d>
impl<'d> UnsafeUnpin for OutputOpenDrain<'d>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more