[−][src]Struct gpio_cdev::Lines
A collection of lines that can be accesses simultaneously
This is a collection of lines, all from the same GPIO chip that can all be accessed simultaneously
Implementations
impl Lines[src]
pub fn chip(&self) -> Chip[src]
Get a handle to the parent chip for the lines
pub fn len(&self) -> usize[src]
Get the number of lines in the collection
pub fn request(
&self,
flags: LineRequestFlags,
default: &[u8],
consumer: &str
) -> Result<MultiLineHandle, Error>[src]
&self,
flags: LineRequestFlags,
default: &[u8],
consumer: &str
) -> Result<MultiLineHandle, Error>
Request access to interact with these lines from the kernel
This is similar to the "export" operation present in the sysfs
API with the key difference that we are also able to configure
the GPIO with flags to specify how the line will be used
at the time of request.
For an output, the default parameter specifies the value
each line should have when it is configured as an output. The
consumer string should describe the process consuming the
line (this will be truncated to 31 characters if too long).
Errors
The main source of errors here is if the kernel returns an
error to the ioctl performing the request here. This will
result in an Error being returned with ErrorKind::Ioctl.
One possible cause for an error here would be if the lines are
already in use. One can check for this prior to making the
request using is_kernel.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Lines
impl Send for Lines
impl Sync for Lines
impl Unpin for Lines
impl UnwindSafe for Lines
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,