Struct rust_gpiozero::output_devices::OutputDevice
[−]
[src]
pub struct OutputDevice { pub pin: Pin, }
Represents a generic GPIO output device.
Fields
pin: Pin
Methods
impl OutputDevice
[src]
pub fn new(pin: u64) -> OutputDevice
[src]
Trait Implementations
impl Debug for OutputDevice
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl OutputDeviceTrait for OutputDevice
[src]
fn pin(&self) -> Pin
[src]
Get the pin
fn on(&mut self)
[src]
Turns the device on.
fn off(&mut self)
[src]
Turns the device off.
fn toggle(&mut self)
[src]
Reverse the state of the device. If it's on, turn it off; if it's off, turn it on. Read more