Struct rust_gpiozero::input_devices::InputDevice [−][src]
pub struct InputDevice { /* fields omitted */ }
Represents a generic GPIO input device.
Implementations
impl InputDevice
[src]
impl InputDevice
[src]pub fn new(pin: u8) -> InputDevice
[src]
pub fn new(pin: u8) -> InputDevice
[src]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
pub fn new_with_pullup(pin: u8) -> InputDevice
[src]
pub fn new_with_pullup(pin: u8) -> InputDevice
[src]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