Struct embassy_stm32::gpio::Output
source ยท 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