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§
Source§impl<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.
Source§impl 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.
Source§impl 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> Freeze for Lines<Direction>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more