Struct async_std_gpiod::Lines
source · [−]pub struct Lines<Direction> { /* private fields */ }
Expand description
The interface for getting the values of GPIO lines configured for input
Use Chip::request_lines with Options::input or Options::output to configure specific GPIO lines for input or output.
Implementations
sourceimpl<Direction: DirectionType> Lines<Direction>
impl<Direction: DirectionType> Lines<Direction>
sourcepub async fn get_values<T: AsValuesMut + Send + 'static>(
&self,
values: T
) -> Result<T>
pub async fn get_values<T: AsValuesMut + Send + 'static>(
&self,
values: T
) -> Result<T>
Get the value of GPIO lines
The values can only be read if the lines have previously been requested as inputs or outputs using the Chip::request_lines method with Options::input or with Options::output.
sourceimpl Lines<Input>
impl Lines<Input>
sourcepub async fn read_event(&mut self) -> Result<Event>
pub async fn read_event(&mut self) -> Result<Event>
Read GPIO events synchronously
The values can only be read if the lines have previously been requested as inputs using the Chip::request_lines method with Options::input.
sourceimpl Lines<Output>
impl Lines<Output>
sourcepub async fn set_values<T: AsValues + Send + 'static>(
&self,
values: T
) -> Result<()>
pub async fn set_values<T: AsValues + Send + 'static>(
&self,
values: T
) -> Result<()>
Set the value of GPIO lines
The value can only be set if the lines have previously been requested as outputs using the Chip::request_lines with Options::output.
Methods from Deref<Target = ValuesInfo>
Trait Implementations
Auto Trait Implementations
impl<Direction> RefUnwindSafe for Lines<Direction>where
Direction: RefUnwindSafe,
impl<Direction> Send for Lines<Direction>where
Direction: Send,
impl<Direction> Sync for Lines<Direction>where
Direction: Sync,
impl<Direction> Unpin for Lines<Direction>where
Direction: Unpin,
impl<Direction> UnwindSafe for Lines<Direction>where
Direction: 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