Struct async_std_gpiod::Options
source · [−]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
sourceimpl<Direction, Lines, Consumer> Options<Direction, Lines, Consumer>where
Lines: AsRef<[u32]>,
Consumer: AsRef<str>,
impl<Direction, Lines, Consumer> Options<Direction, Lines, Consumer>where
Lines: AsRef<[u32]>,
Consumer: AsRef<str>,
sourceimpl<Lines, Consumer> Options<Input, Lines, Consumer>
impl<Lines, Consumer> Options<Input, Lines, Consumer>
sourcepub fn edge(self, edge: EdgeDetect) -> Options<Input, Lines, Consumer>
pub fn edge(self, edge: EdgeDetect) -> Options<Input, Lines, Consumer>
Configure edge detection
Available only for inputs
Auto Trait Implementations
impl<Direction, Lines, Consumer> RefUnwindSafe for Options<Direction, Lines, Consumer>where
Consumer: RefUnwindSafe,
Direction: RefUnwindSafe,
Lines: RefUnwindSafe,
impl<Direction, Lines, Consumer> Send for Options<Direction, Lines, Consumer>where
Consumer: Send,
Direction: Send,
Lines: Send,
impl<Direction, Lines, Consumer> Sync for Options<Direction, Lines, Consumer>where
Consumer: Sync,
Direction: Sync,
Lines: Sync,
impl<Direction, Lines, Consumer> Unpin for Options<Direction, Lines, Consumer>where
Consumer: Unpin,
Direction: Unpin,
Lines: Unpin,
impl<Direction, Lines, Consumer> UnwindSafe for Options<Direction, Lines, Consumer>where
Consumer: UnwindSafe,
Direction: UnwindSafe,
Lines: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more