pub struct Output<'d> { /* private fields */ }
Expand description
GPIO output driver.
Implementations§
Source§impl<'d> Output<'d>
impl<'d> Output<'d>
Sourcepub fn new(
pin: impl Peripheral<P = impl Pin> + 'd,
initial_output: Level,
drive: OutputDrive,
) -> Self
pub fn new( pin: impl Peripheral<P = impl Pin> + 'd, initial_output: Level, drive: OutputDrive, ) -> Self
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> StatefulOutputPin for Output<'d>
impl<'d> StatefulOutputPin for Output<'d>
Source§impl<'d> StatefulOutputPin for Output<'d>
impl<'d> StatefulOutputPin for Output<'d>
Auto Trait Implementations§
impl<'d> Freeze for Output<'d>
impl<'d> RefUnwindSafe for Output<'d>
impl<'d> Send for Output<'d>
impl<'d> Sync for Output<'d>
impl<'d> Unpin for Output<'d>
impl<'d> !UnwindSafe for Output<'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