Struct Output
pub struct Output { /* private fields */ }
Expand description
A GPIO output.
Implementations§
§impl Output
impl Output
pub fn new(
pin: impl Peripheral
+ 'static,
initial_level: Level,
) -> Output
where
<impl Peripheral + 'static as Peripheral>::P: OutputPin,
pub fn new( pin: impl Peripheral
+ 'static, initial_level: Level, ) -> Output
where
<impl Peripheral + 'static as Peripheral>::P: OutputPin,
Returns a configured Output
.
pub fn builder<P>(pin: P, initial_level: Level) -> OutputBuilder<P>where
P: Peripheral,
<P as Peripheral>::P: OutputPin,
pub fn builder<P>(pin: P, initial_level: Level) -> OutputBuilder<P>where
P: Peripheral,
<P as Peripheral>::P: OutputPin,
Returns an OutputBuilder
, allowing to configure the GPIO output further.
pub fn set_high(&mut self)
pub fn set_high(&mut self)
Sets the output as high.
pub fn set_low(&mut self)
pub fn set_low(&mut self)
Sets the output as low.
pub fn toggle(&mut self)
pub fn toggle(&mut self)
Toggles the output level.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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