pub struct Options<Direction = (), Lines = (), Consumer = ()> { /* private fields */ }
Expand description

GPIO line values request options

Input config:

let input = Options::input(&[23, 17, 3])
    .active(Active::Low)
    .bias(Bias::PullUp)
    .consumer("my inputs");

Output config:

let output = Options::output(&[11, 20])
    .active(Active::Low)
    .drive(Drive::PushPull)
    .values([false, true])
    .consumer("my outputs");

Input with edge detection:

let input = Options::input(&[21, 13])
    .active(Active::Low)
    .bias(Bias::PullUp)
    .edge(EdgeDetect::Both)
    .consumer("my inputs");

Implementations

Create input options

Create output options

Configure consumer string

Configure GPIO lines astive state

Available both for inputs and outputs

Configure GPIO lines bias

Available both for inputs and outputs

Make an independent copy of options

Configure edge detection

Available only for inputs

Configure edge detection

Available only for outputs

Configure default values

Available only for outputs

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.