pub struct InputDevice { /* private fields */ }
Expand description
Represents a generic GPIO input device.
Implementations§
Source§impl InputDevice
impl InputDevice
Sourcepub fn new(pin: u8) -> InputDevice
pub fn new(pin: u8) -> InputDevice
Returns an InputDevice with the pin number given with the pin pulled to low by default
is_active
property is adjusted accordingly so that
True
still means active regardless of the :attr:pull_up
setting
§Arguments
pin
- The GPIO pin which the device is attached to
Sourcepub fn new_with_pullup(pin: u8) -> InputDevice
pub fn new_with_pullup(pin: u8) -> InputDevice
Returns an InputDevice with the pin number given with the pin pulled high with an internal resistor by default
is_active
property is adjusted accordingly so that
True
still means active regardless of the :attr:pull_up
setting
§Arguments
pin
- The GPIO pin which the device is attached to
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputDevice
impl !RefUnwindSafe for InputDevice
impl Send for InputDevice
impl Sync for InputDevice
impl Unpin for InputDevice
impl !UnwindSafe for InputDevice
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