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