|
| | Chip (const std::string &consumer=std::string()) |
| | Constructor for the Chip class.
|
| |
| | ~Chip () |
| | Destructor for the Chip class.
|
| |
| std::string | consumer () const |
| | Gets the consumer label of the GPIO chip.
|
| |
| template<class ParamType > |
| bool | ioCtl (unsigned long cmd, ParamType *param) |
| | Performs an IOCTL operation on the GPIO chip.
|
| |
| int | errorCode () const |
| | Gets the last error code from the IOCTL operation.
|
| |
| int | result () const |
| | Gets the result of the last IOCTL operation.
|
| |
| const char * | errorMessage () const |
| | Gets the error message corresponding to the last error code.
|
| |
| bool | open (const char *dev) |
| | Opens the GPIO chip device.
|
| |
| bool | open (const std::string &dev) |
| | Opens the GPIO chip device using a string.
|
| |
| bool | open (uint32_t chip_no) |
| | Opens the GPIO chip device using a chip number.
|
| |
| bool | isOpen () const |
| | Checks if the GPIO chip device is open.
|
| |
| std::string | dev () const |
| | Gets the path to the GPIO chip device.
|
| |
| bool | close () |
| | Closes the GPIO chip device.
|
| |
| bool | fillInfo () |
| | Fills the chip information structure with data from the device.
|
| |
| std::string | name () const |
| | Gets the name of the GPIO chip.
|
| |
| std::string | label () const |
| | Gets the label of the GPIO chip.
|
| |
| uint32_t | lines () const |
| | Gets the number of lines available on the GPIO chip.
|
| |
| bool | lineInfo (uint32_t offset, LineInfo *info) |
| | Retrieves information about a specific GPIO line.
|
| |
Represents a GPIO chip and provides methods to interact with it.
This class encapsulates the functionality to open, close, and query information about a GPIO chip, as well as perform IOCTL operations.
- Note
- The class is not copyable or movable.
Definition at line 547 of file gpio2.h.
| bool Gpio2::Chip::close |
( |
| ) |
|
|
inline |
template<class ParamType >
| bool Gpio2::Chip::ioCtl |
( |
unsigned long |
cmd, |
|
|
ParamType * |
param |
|
) |
| |
|
inline |
Performs an IOCTL operation on the GPIO chip.
- Template Parameters
-
| ParamType | The type of the parameter for the IOCTL operation. |
- Parameters
-
| cmd | The IOCTL command. |
| param | A pointer to the parameter for the IOCTL operation. |
- Returns
- true if the operation was successful, false otherwise.
Definition at line 581 of file gpio2.h.
References m_fd, m_last_error, and m_last_result.
Referenced by fillInfo(), and lineInfo().
| bool Gpio2::Chip::open |
( |
const char * |
dev | ) |
|
|
inline |