Struct IntEnabledInput
pub struct IntEnabledInput<'a> { /* private fields */ }Available on crate feature
external-interrupts only.Expand description
A GPIO input that supports external interrupts.
Can be obtained with InputBuilder::build_with_interrupt().
Implementations§
§impl IntEnabledInput<'_>
impl IntEnabledInput<'_>
pub async fn wait_for_high(&mut self)
pub async fn wait_for_high(&mut self)
Asynchronously waits until the input level is high. Returns immediately if it is already high.
pub async fn wait_for_low(&mut self)
pub async fn wait_for_low(&mut self)
Asynchronously waits until the input level is low. Returns immediately if it is already low.
pub async fn wait_for_rising_edge(&mut self)
pub async fn wait_for_rising_edge(&mut self)
Asynchronously waits for the input level to transition from low to high.
pub async fn wait_for_falling_edge(&mut self)
pub async fn wait_for_falling_edge(&mut self)
Asynchronously waits for the input level to transition from high to low.
pub async fn wait_for_any_edge(&mut self)
pub async fn wait_for_any_edge(&mut self)
Asynchronously waits for the input level to transition from one level to the other.
Trait Implementations§
§impl InputPin for IntEnabledInput<'_>
impl InputPin for IntEnabledInput<'_>
§fn is_high(&mut self) -> Result<bool, <IntEnabledInput<'_> as ErrorType>::Error>
fn is_high(&mut self) -> Result<bool, <IntEnabledInput<'_> as ErrorType>::Error>
Is the input pin high?
§fn is_low(&mut self) -> Result<bool, <IntEnabledInput<'_> as ErrorType>::Error>
fn is_low(&mut self) -> Result<bool, <IntEnabledInput<'_> as ErrorType>::Error>
Is the input pin low?
§impl Wait for IntEnabledInput<'_>
impl Wait for IntEnabledInput<'_>
§async fn wait_for_high(
&mut self,
) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
async fn wait_for_high( &mut self, ) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
Wait until the pin is high. If it is already high, return immediately. Read more
§async fn wait_for_low(
&mut self,
) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
async fn wait_for_low( &mut self, ) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
Wait until the pin is low. If it is already low, return immediately. Read more
§async fn wait_for_rising_edge(
&mut self,
) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
async fn wait_for_rising_edge( &mut self, ) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
Wait for the pin to undergo a transition from low to high. Read more
§async fn wait_for_falling_edge(
&mut self,
) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
async fn wait_for_falling_edge( &mut self, ) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
Wait for the pin to undergo a transition from high to low. Read more
§async fn wait_for_any_edge(
&mut self,
) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
async fn wait_for_any_edge( &mut self, ) -> Result<(), <IntEnabledInput<'_> as ErrorType>::Error>
Wait for the pin to undergo any transition, i.e low to high OR high to low.
Auto Trait Implementations§
impl<'a> Freeze for IntEnabledInput<'a>
impl<'a> RefUnwindSafe for IntEnabledInput<'a>
impl<'a> Send for IntEnabledInput<'a>
impl<'a> Sync for IntEnabledInput<'a>
impl<'a> Unpin for IntEnabledInput<'a>
impl<'a> UnwindSafe for IntEnabledInput<'a>
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