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,
) -> Self
pub fn new( pin: impl Peripheral<P = impl Pin> + 'd, initial_output: Level, ) -> Self
Sourcepub fn set_drive_strength(&mut self, strength: Drive)
pub fn set_drive_strength(&mut self, strength: Drive)
Set the pin’s drive strength.
Sourcepub fn set_slew_rate(&mut self, slew_rate: SlewRate)
pub fn set_slew_rate(&mut self, slew_rate: SlewRate)
Set the pin’s slew rate.
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