pub struct GpioPin { /* private fields */ }
Expand description
A GpioPin represents a single pin on a gpio device.
This is a lightweight wrapper around the Zephyr gpio_dt_spec
structure.
Implementations§
Source§impl GpioPin
impl GpioPin
Sourcepub unsafe fn wait_for_high(&mut self) -> impl Future<Output = ()> + use<'_>
pub unsafe fn wait_for_high(&mut self) -> impl Future<Output = ()> + use<'_>
Asynchronously wait for a gpio pin to become high.
§Safety
Safety of multiple GPIOs depends on the underlying controller.
Sourcepub unsafe fn wait_for_low(&mut self) -> impl Future<Output = ()> + use<'_>
pub unsafe fn wait_for_low(&mut self) -> impl Future<Output = ()> + use<'_>
Asynchronously wait for a gpio pin to become low.
§Safety
Safety of multiple GPIOs depends on the underlying controller.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpioPin
impl !RefUnwindSafe for GpioPin
impl !Sync for GpioPin
impl Unpin for GpioPin
impl !UnwindSafe for GpioPin
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