pub struct OutputOpenDrain<'d> { /* private fields */ }Expand description
GPIO output open-drain driver.
Note that pins will return to their floating state when OutputOpenDrain is dropped.
If pins should retain their state indefinitely, either keep ownership of the
OutputOpenDrain, or pass it to [core::mem::forget].
Implementations§
Source§impl<'d> OutputOpenDrain<'d>
impl<'d> OutputOpenDrain<'d>
Sourcepub fn is_set_high(&self) -> bool
pub fn is_set_high(&self) -> bool
Get whether the output level is set to high.
Sourcepub fn is_set_low(&self) -> bool
pub fn is_set_low(&self) -> bool
Get whether the output level is set to low.
Sourcepub fn get_output_level(&self) -> Level
pub fn get_output_level(&self) -> Level
Get the current output level.
Trait Implementations§
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> StatefulOutputPin for OutputOpenDrain<'d>
impl<'d> StatefulOutputPin for OutputOpenDrain<'d>
Source§fn is_set_low(&mut self) -> Result<bool, Self::Error>
fn is_set_low(&mut self) -> Result<bool, Self::Error>
Is the output pin set as low?
Source§fn is_set_high(&mut self) -> Result<bool, Self::Error>
fn is_set_high(&mut self) -> Result<bool, Self::Error>
Is the pin in drive high mode? Read more