Functions for retrieving kernel information about chips.
Line info object contains an immutable snapshot of a chip's status.
The chip info contains all the publicly available information about a chip.
Some accessor methods return pointers. Those pointers refer to internal fields. The lifetimes of those fields are tied to the lifetime of the containing chip info object. Such pointers remain valid until gpiod_chip_info_free is called on the containing chip info object. They must not be freed by the caller.
Free a chip info object and release all associated resources.
- Parameters
-
info | GPIO chip info object to free. |
Get the label of the chip as represented in the kernel.
- Parameters
-
info | GPIO chip info object. |
- Returns
- Valid pointer to a human-readable string containing the chip label. The string lifetime is tied to the chip info object so the pointer must not be freed by the caller.
Get the name of the chip as represented in the kernel.
- Parameters
-
info | GPIO chip info object. |
- Returns
- Valid pointer to a human-readable string containing the chip name. The string lifetime is tied to the chip info object so the pointer must not be freed by the caller.
Get the number of lines exposed by the chip.
- Parameters
-
info | GPIO chip info object. |
- Returns
- Number of GPIO lines.