Contains an immutable snapshot of the line's state at the time when the object of this class was instantiated.
More...
#include <line-info.hpp>
Contains an immutable snapshot of the line's state at the time when the object of this class was instantiated.
Definition at line 34 of file line-info.hpp.
◆ line_info() [1/2]
gpiod::line_info::line_info |
( |
const line_info & |
other | ) |
|
|
noexcept |
Copy constructor.
- Parameters
-
◆ line_info() [2/2]
gpiod::line_info::line_info |
( |
line_info && |
other | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ active_low()
bool gpiod::line_info::active_low |
( |
| ) |
const |
|
noexcept |
Check if the signal of this line is inverted.
- Returns
- True if this line is "active-low", false otherwise.
◆ bias()
Read the GPIO line bias setting.
- Returns
- Returns BIAS_PULL_UP, BIAS_PULL_DOWN, BIAS_DISABLE or BIAS_UNKNOWN.
◆ consumer()
::std::string gpiod::line_info::consumer |
( |
| ) |
const |
|
noexcept |
Read the GPIO line consumer name.
- Returns
- Name of the GPIO consumer name as it is represented in the kernel. This routine returns an empty string if the line is not used.
◆ debounce_period()
::std::chrono::microseconds gpiod::line_info::debounce_period |
( |
| ) |
const |
|
noexcept |
Read the current debounce period in microseconds.
- Returns
- Current debounce period in microseconds, 0 if the line is not debounced.
◆ debounced()
bool gpiod::line_info::debounced |
( |
| ) |
const |
|
noexcept |
Check if this line is debounced (either by hardware or by the kernel software debouncer).
- Returns
- True if the line is debounced, false otherwise.
◆ direction()
Read the GPIO line direction setting.
- Returns
- Returns DIRECTION_INPUT or DIRECTION_OUTPUT.
◆ drive()
Read the GPIO line drive setting.
- Returns
- Returns DRIVE_PUSH_PULL, DRIVE_OPEN_DRAIN or DRIVE_OPEN_SOURCE.
◆ edge_detection()
line::edge gpiod::line_info::edge_detection |
( |
| ) |
const |
Read the current edge detection setting of this line.
- Returns
- Returns EDGE_NONE, EDGE_RISING, EDGE_FALLING or EDGE_BOTH.
◆ event_clock()
Read the current event clock setting used for edge event timestamps.
- Returns
- Returns MONOTONIC, REALTIME or HTE.
◆ name()
::std::string gpiod::line_info::name |
( |
| ) |
const |
|
noexcept |
Get the GPIO line name.
- Returns
- Name of the GPIO line as it is represented in the kernel. This routine returns an empty string if the line is unnamed.
◆ offset()
Get the hardware offset of the line.
- Returns
- Offset of the line within the parent chip.
◆ operator=() [1/2]
Copy assignment operator.
- Parameters
-
- Returns
- Reference to self.
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Reference to self.
◆ used()
bool gpiod::line_info::used |
( |
| ) |
const |
|
noexcept |
Check if the line is currently in use.
- 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.
The documentation for this class was generated from the following file: