Add a getter function for retrieving line handles from bulk objects.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
bulk->lines[bulk->num_lines++] = line;
}
+/**
+ * @brief Retrieve the line handle from a line bulk object at given offset.
+ * @param bulk Line bulk object.
+ * @param offset Line offset.
+ * @return Line handle at given offset.
+ */
+static inline struct gpiod_line *
+gpiod_line_bulk_get_line(struct gpiod_line_bulk *bulk, unsigned int offset)
+{
+ return bulk->lines[offset];
+}
+
/**
* @brief Read the GPIO line offset.
* @param line GPIO line object.