Struct rust_gpiozero::output_devices::OutputDevice [−][src]
pub struct OutputDevice { /* fields omitted */ }
Represents a generic GPIO output device.
Implementations
impl OutputDevice
[src]
impl OutputDevice
[src]pub fn new(pin: u8) -> OutputDevice
[src]
pub fn new(pin: u8) -> OutputDevice
[src]Returns an OutputDevice with the pin number given
pin
- The GPIO pin which the device is attached to
pub fn is_active(&self) -> bool
[src]
pub fn is_active(&self) -> bool
[src]Returns True
if the device is currently active and False
otherwise.
pub fn set_active_high(&mut self, value: bool)
[src]
pub fn set_active_high(&mut self, value: bool)
[src]Set the state for active_high
pub fn active_high(&self) -> bool
[src]
pub fn active_high(&self) -> bool
[src]When True
, the value
property is True
when the device’s
pin
is high. When False
the value
property is
True
when the device’s pin is low (i.e. the value is inverted).
Be warned that changing it will invert value
(i.e. changing this property doesn’t change
the device’s pin state - it just changes how that state is interpreted).