pub struct Output<'d> { /* private fields */ }
Expand description
GPIO output driver.
Note that pins will return to their floating state when Output
is dropped.
If pins should retain their state indefinitely, either keep ownership of the
Output
, or pass it to core::mem::forget
.
Implementations§
Source§impl<'d> Output<'d>
impl<'d> Output<'d>
Sourcepub fn new(
pin: impl Peripheral<P = impl Pin> + 'd,
initial_output: Level,
speed: Speed,
) -> Self
pub fn new( pin: impl Peripheral<P = impl Pin> + 'd, initial_output: Level, speed: Speed, ) -> Self
Sourcepub fn is_set_high(&self) -> bool
pub fn is_set_high(&self) -> bool
Is the output pin set as high?
Sourcepub fn is_set_low(&self) -> bool
pub fn is_set_low(&self) -> bool
Is the output pin set as low?
Sourcepub fn get_output_level(&self) -> Level
pub fn get_output_level(&self) -> Level
What level output is set to
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