[][src]Struct gpio_cdev::LineInfo

pub struct LineInfo { /* fields omitted */ }

Information about a specific GPIO Line

Wraps kernel struct gpioline_info.

Implementations

impl LineInfo[src]

pub fn line(&self) -> &Line[src]

Get a handle to the line that this info represents

pub fn name(&self) -> Option<&str>[src]

Name assigned to this chip if assigned

pub fn consumer(&self) -> Option<&str>[src]

The name of this GPIO line, such as the output pin of the line on the chip, a rail or a pin header name on a board, as specified by the gpio chip.

pub fn direction(&self) -> LineDirection[src]

Get the direction of this GPIO if configured

Lines are considered to be inputs if not explicitly marked as outputs in the line info flags by the kernel.

pub fn is_used(&self) -> bool[src]

True if the any flags for the device are set (input or output)

pub fn is_kernel(&self) -> bool[src]

True if this line is being used by something else in the kernel

If another driver or subsystem in the kernel is using the line then it cannot be used via the cdev interface. See relevant kernel code.

pub fn is_active_low(&self) -> bool[src]

True if this line is marked as active low in the kernel

pub fn is_open_drain(&self) -> bool[src]

True if this line is marked as open drain in the kernel

pub fn is_open_source(&self) -> bool[src]

True if this line is marked as open source in the kernel

Trait Implementations

impl Clone for LineInfo[src]

impl Debug for LineInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.