Struct IntEnabledInput
pub struct IntEnabledInput { /* 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 Freeze for IntEnabledInput
impl RefUnwindSafe for IntEnabledInput
impl Send for IntEnabledInput
impl Sync for IntEnabledInput
impl Unpin for IntEnabledInput
impl UnwindSafe for IntEnabledInput
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