pub struct InfoRef { /* private fields */ }Expand description
Line info reference
Exposes functions for retrieving kernel information about both requested and free lines. Line info object contains an immutable snapshot of a line’s status.
The line info contains all the publicly available information about a line, which does not include the line value. The line must be requested to access the line value.
InfoRef only abstracts a reference to a [gpiod::gpiod_line_info] instance whose lifetime is managed by a different object instance. The owned counter-part of this type is Info.
Implementations§
Source§impl InfoRef
impl InfoRef
Sourcepub fn offset(&self) -> Offset
pub fn offset(&self) -> Offset
Get the offset of the line within the GPIO chip.
The offset uniquely identifies the line on the chip. The combination of the chip and offset uniquely identifies the line within the system.
Sourcepub fn is_used(&self) -> bool
pub fn is_used(&self) -> bool
Returns True if the line is in use, false otherwise.
The user space can’t know exactly why a line is busy. It may have been requested by another process or hogged by the kernel. It only matters that the line is used and we can’t request it.
Sourcepub fn is_active_low(&self) -> bool
pub fn is_active_low(&self) -> bool
Returns true if the line is “active-low”, false otherwise.
Sourcepub fn edge_detection(&self) -> Result<Option<Edge>>
pub fn edge_detection(&self) -> Result<Option<Edge>>
Get the current edge detection setting of the line.
Sourcepub fn event_clock(&self) -> Result<EventClock>
pub fn event_clock(&self) -> Result<EventClock>
Get the current event clock setting used for edge event timestamps.
Sourcepub fn is_debounced(&self) -> bool
pub fn is_debounced(&self) -> bool
Returns true if the line is debounced (either by hardware or by the kernel software debouncer), false otherwise.
Sourcepub fn debounce_period(&self) -> Duration
pub fn debounce_period(&self) -> Duration
Get the debounce period of the line.