Loading...
Searching...
No Matches
Chip info

## Functions

void | gpiod_chip_info_free (struct gpiod_chip_info *info)
| Free a chip info object and release all associated resources.
const char * | gpiod_chip_info_get_name (struct gpiod_chip_info *info)
| Get the name of the chip as represented in the kernel.
const char * | gpiod_chip_info_get_label (struct gpiod_chip_info *info)
| Get the label of the chip as represented in the kernel.
size_t | gpiod_chip_info_get_num_lines (struct gpiod_chip_info *info)
| Get the number of lines exposed by the chip.

## Detailed Description

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.

## Function Documentation

## gpiod_chip_info_free()

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.

## gpiod_chip_info_get_label()

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.

## gpiod_chip_info_get_name()

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.

## gpiod_chip_info_get_num_lines()

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.