pub struct LineInfo { /* private fields */ }
Expand description
Information about a specific GPIO Line
Wraps kernel struct gpioline_info
.
Implementations§
source§impl LineInfo
impl LineInfo
sourcepub fn consumer(&self) -> Option<&str>
pub fn consumer(&self) -> Option<&str>
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.
sourcepub fn direction(&self) -> LineDirection
pub fn direction(&self) -> LineDirection
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.
sourcepub fn is_kernel(&self) -> bool
pub fn is_kernel(&self) -> bool
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.
sourcepub fn is_active_low(&self) -> bool
pub fn is_active_low(&self) -> bool
True if this line is marked as active low in the kernel
sourcepub fn is_open_drain(&self) -> bool
pub fn is_open_drain(&self) -> bool
True if this line is marked as open drain in the kernel
sourcepub fn is_open_source(&self) -> bool
pub fn is_open_source(&self) -> bool
True if this line is marked as open source in the kernel
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineInfo
impl RefUnwindSafe for LineInfo
impl Send for LineInfo
impl Sync for LineInfo
impl Unpin for LineInfo
impl UnwindSafe for LineInfo
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