gpio: chardev: Add helper to retrieve gpiochip and line offset by line name
This makes the retrieval robust against chips being reordered during boot. The results can be used to fill out mraa_pin_t while initializing a board. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
@@ -49,6 +49,8 @@ mraa_boolean_t mraa_is_gpio_line_open_source(mraa_gpiod_line_info *linfo);
|
||||
int mraa_get_number_of_gpio_chips();
|
||||
int mraa_get_chip_infos(mraa_gpiod_chip_info*** cinfos);
|
||||
|
||||
int mraa_find_gpio_line_by_name(const char *name, unsigned *chip_number, unsigned *line_number);
|
||||
|
||||
/* Multiple gpio support. */
|
||||
typedef struct _gpio_group* mraa_gpiod_group_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user