Struct Input
pub struct Input<'a> { /* private fields */ }Expand description
A GPIO input.
If support for external interrupts is needed, use InputBuilder::build_with_interrupt() to
obtain an IntEnabledInput.
Implementations§
§impl<'a> Input<'a>
impl<'a> Input<'a>
pub fn new<P>(pin: impl IntoPeripheral<'a, P>, pull: Pull) -> Input<'a>where
P: InputPin + 'a,
pub fn new<P>(pin: impl IntoPeripheral<'a, P>, pull: Pull) -> Input<'a>where
P: InputPin + 'a,
Returns a configured Input.
If you want to re-use a pin at runtime, you can give the result of .reborrow() of the pin instance to this constructor.
This driver and the child pin instance need to be dropped before being able to use the pin in another driver.
pub fn builder<T, P>(pin: T, pull: Pull) -> InputBuilder<'a, T, P>where
T: IntoPeripheral<'a, P>,
P: InputPin + 'a,
pub fn builder<T, P>(pin: T, pull: Pull) -> InputBuilder<'a, T, P>where
T: IntoPeripheral<'a, P>,
P: InputPin + 'a,
Returns an InputBuilder, allowing to configure the GPIO input further.
If you want to re-use a pin at runtime, you can give the result of .reborrow() of the pin instance to this constructor.
This driver and the child pin instance need to be dropped before being able to use the pin in another driver.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Input<'a>
impl<'a> RefUnwindSafe for Input<'a>
impl<'a> Send for Input<'a>
impl<'a> Sync for Input<'a>
impl<'a> Unpin for Input<'a>
impl<'a> UnwindSafe for Input<'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