libgpiod
1.2
|
Data Structures | |
struct | gpiod_line_bulk |
Helper structure for storing a set of GPIO line objects. More... | |
Macros | |
#define | GPIOD_LINE_BULK_MAX_LINES 64 |
Maximum number of GPIO lines that can be requested at once. | |
#define | GPIOD_LINE_BULK_INITIALIZER { { NULL }, 0 } |
Static initializer for GPIO bulk objects. More... | |
#define | gpiod_line_bulk_foreach_line(bulk, line, lineptr) |
Iterate over all line handles held by a line bulk object. More... | |
#define | gpiod_line_bulk_foreach_line_off(bulk, line, offset) |
Iterate over all line handles held by a line bulk object (integer counter variant). More... | |
Functions | |
static void | gpiod_line_bulk_init (struct gpiod_line_bulk *bulk) |
Initialize a GPIO bulk object. More... | |
static void | gpiod_line_bulk_add (struct gpiod_line_bulk *bulk, struct gpiod_line *line) |
Add a single line to a GPIO bulk object. More... | |
static struct gpiod_line * | gpiod_line_bulk_get_line (struct gpiod_line_bulk *bulk, unsigned int offset) |
Retrieve the line handle from a line bulk object at given offset. More... | |
static unsigned int | gpiod_line_bulk_num_lines (struct gpiod_line_bulk *bulk) |
Retrieve the number of GPIO lines held by this line bulk object. More... | |
#define gpiod_line_bulk_foreach_line | ( | bulk, | |
line, | |||
lineptr | |||
) |
Iterate over all line handles held by a line bulk object.
bulk | Line bulk object. |
line | GPIO line handle. On each iteration, the subsequent line handle is assigned to this pointer. |
lineptr | Pointer to a GPIO line handle used to store the loop state. |
#define gpiod_line_bulk_foreach_line_off | ( | bulk, | |
line, | |||
offset | |||
) |
Iterate over all line handles held by a line bulk object (integer counter variant).
bulk | Line bulk object. |
line | GPIO line handle. On each iteration, the subsequent line handle is assigned to this pointer. |
offset | An integer variable used to store the loop state. |
This is a variant of gpiod_line_bulk_foreach_line which uses an integer variable (either signed or unsigned) to store the loop state. This offset variable is guaranteed to correspond with the offset of the current line in the bulk->lines array.
#define GPIOD_LINE_BULK_INITIALIZER { { NULL }, 0 } |
|
inlinestatic |
Add a single line to a GPIO bulk object.
bulk | Line bulk object. |
line | Line to add. |
Definition at line 575 of file gpiod.h.
References gpiod_line_bulk::lines, and gpiod_line_bulk::num_lines.
|
static |
Retrieve the line handle from a line bulk object at given offset.
bulk | Line bulk object. |
offset | Line offset. |
Definition at line 588 of file gpiod.h.
References gpiod_line_bulk::lines.
|
inlinestatic |
Initialize a GPIO bulk object.
bulk | Line bulk object. |
This routine simply sets the internally held number of lines to 0.
Definition at line 565 of file gpiod.h.
References gpiod_line_bulk::num_lines.
|
inlinestatic |
Retrieve the number of GPIO lines held by this line bulk object.
bulk | Line bulk object. |
Definition at line 599 of file gpiod.h.
References gpiod_line_bulk::num_lines.