pub struct PinConfiguration {
pub name: String,
pub mode: Option<PinMode>,
pub level: Option<bool>,
pub pull_mode: Option<PullMode>,
pub volts: Option<f32>,
pub alias_of: Option<String>,
pub invert: Option<bool>,
pub on_io_expander: Option<IoExpanderPin>,
}
Expand description
Configuration of a particular GPIO pin.
Fields§
§name: String
The user-visible name of the GPIO pin.
mode: Option<PinMode>
The input/output mode of the GPIO pin.
level: Option<bool>
The default/initial level of the pin (true means high), has effect only in PushPull
and
OpenDrain
modes.
pull_mode: Option<PullMode>
Whether the pin has pullup/down resistor enabled.
volts: Option<f32>
The default/initial analog level of the pin in Volts, has effect only in AnalogOutput
mode.
alias_of: Option<String>
If present, the name given by the first member of this struct is to be an alias of the pin
named in this field, (which may by defined by the transport natively, or through alias in
nother PinConfiguration). This field is mutually exclusive with on_io_expander
.
invert: Option<bool>
If true, value of this pins will be inverted both at reading and writing.
on_io_expander: Option<IoExpanderPin>
If present, this pin is not natively supported by the transport, but is to be accessed
through an IO expander. This field is mutually exclusive with alias_of
.
Trait Implementations§
Source§impl Clone for PinConfiguration
impl Clone for PinConfiguration
Source§fn clone(&self) -> PinConfiguration
fn clone(&self) -> PinConfiguration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more