GPIO chip info
- group chip_info
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.
Functions
-
void gpiod_chip_info_free(struct gpiod_chip_info *info)
Free a chip info object and release all associated resources.
- Parameters:
info – GPIO chip info object to free.
-
const char *gpiod_chip_info_get_name(struct gpiod_chip_info *info)
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.
-
const char *gpiod_chip_info_get_label(struct gpiod_chip_info *info)
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.
-
size_t gpiod_chip_info_get_num_lines(struct gpiod_chip_info *info)
Get the number of lines exposed by the chip.
- Parameters:
info – GPIO chip info object.
- Returns:
Number of GPIO lines.
-
void gpiod_chip_info_free(struct gpiod_chip_info *info)