libgpiod
1.6.2
|
Functions that didn't fit anywhere else. More...
Functions | |
struct gpiod_line * | gpiod_line_get (const char *device, unsigned int offset) GPIOD_API |
Get a GPIO line handle by GPIO chip description and offset. More... | |
struct gpiod_line * | gpiod_line_find (const char *name) GPIOD_API |
Find a GPIO line by its name. More... | |
void | gpiod_line_close_chip (struct gpiod_line *line) GPIOD_API |
Close a GPIO chip owning this line and release all resources. More... | |
struct gpiod_chip * | gpiod_line_get_chip (struct gpiod_line *line) GPIOD_API |
Get the handle to the GPIO chip controlling this line. More... | |
Functions that didn't fit anywhere else.
void gpiod_line_close_chip | ( | struct gpiod_line * | line | ) |
Close a GPIO chip owning this line and release all resources.
line | GPIO line object |
After this function returns, the line must no longer be used.
struct gpiod_line* gpiod_line_find | ( | const char * | name | ) |
Find a GPIO line by its name.
name | Name of the GPIO line. |
If this routine succeeds, the user must manually close the GPIO chip owning this line to avoid memory leaks. If the line could not be found, this functions sets errno to ENOENT.
struct gpiod_line* gpiod_line_get | ( | const char * | device, |
unsigned int | offset | ||
) |
Get a GPIO line handle by GPIO chip description and offset.
device | String describing the gpiochip. |
offset | The offset of the GPIO line. |
This routine provides a shorter alternative to calling gpiod_chip_open_lookup and gpiod_chip_get_line.
If this function succeeds, the caller is responsible for closing the associated GPIO chip.
struct gpiod_chip* gpiod_line_get_chip | ( | struct gpiod_line * | line | ) |
Get the handle to the GPIO chip controlling this line.
line | The GPIO line object. |