pub struct Output<const PIN: u8>;Expand description
GPIO output driver
Implementations§
Source§impl<const PIN: u8> Output<PIN>
impl<const PIN: u8> Output<PIN>
Sourcepub fn output_state(&self) -> bool
pub fn output_state(&self) -> bool
Read the output state/level of the pin.
Sourcepub fn set_output(&mut self, on: bool)
pub fn set_output(&mut self, on: bool)
Set the output state/level of the pin.
Trait Implementations§
Source§impl<const PIN: u8> ErrorType for Output<PIN>
Available on crate feature embedded-hal only.
impl<const PIN: u8> ErrorType for Output<PIN>
Available on crate feature
embedded-hal only.Source§type Error = Infallible
type Error = Infallible
Error type
Source§impl<const PIN: u8> StatefulOutputPin for Output<PIN>
Available on crate feature embedded-hal only.
impl<const PIN: u8> StatefulOutputPin for Output<PIN>
Available on crate feature
embedded-hal only.Auto Trait Implementations§
impl<const PIN: u8> Freeze for Output<PIN>
impl<const PIN: u8> RefUnwindSafe for Output<PIN>
impl<const PIN: u8> Send for Output<PIN>
impl<const PIN: u8> Sync for Output<PIN>
impl<const PIN: u8> Unpin for Output<PIN>
impl<const PIN: u8> UnwindSafe for Output<PIN>
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