Trait rust_gpiozero::traits::Device [] [src]

pub trait Device {
    fn pin(&self) -> Pin;
fn value(&self) -> i8; fn close(&self) { ... }
fn is_active(&self) -> bool { ... } }

Represents a single device of any type; GPIO-based, SPI-based, I2C-based, etc. It defines the basic services applicable to all devices

Required Methods

Get the pin

Returns a value representing the device's state.

Provided Methods

Shut down the device and release all associated resources.

Returns True if the device is currently active and Falseotherwise.