pub struct Output { /* private fields */ }Expand description
An output GPIO.
Implementations§
Source§impl Output
impl Output
Sourcepub fn toggle(&self)
pub fn toggle(&self)
Alternate the GPIO pin output.
toggle is implemented in hardware, so it will be more efficient
than implementing in software.
Sourcepub fn is_pad_high(&self) -> bool
pub fn is_pad_high(&self) -> bool
Returns true if the value of the pad is high.
Can differ from is_set(), especially in an open drain config.
Sourcepub fn without_pin(port: &mut Port, offset: u32) -> Self
pub fn without_pin(port: &mut Port, offset: u32) -> Self
Allocate an output GPIO without a pin.
Prefer using Port::output to create a GPIO output with a
pin resource. That method ensures that pin resources are managed throughout
your program, and that the pin is configured to operate as a GPIO output.
You may use this method to allocate duplicate Output object for the same
physical GPIO output. This is considered safe, since the Output API is
reentrant.
If you use this constructor, you’re responsible for configuring the IOMUX multiplexer register.
Trait Implementations§
Source§impl StatefulOutputPin for Output
impl StatefulOutputPin for Output
Auto Trait Implementations§
impl !RefUnwindSafe for Output
impl !Sync for Output
impl !UnwindSafe for Output
impl Freeze for Output
impl Send for Output
impl Unpin for Output
impl UnsafeUnpin 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