From 904e319d8fe9973397e728f458c73a375eaa4e62 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 3 Jan 2017 18:25:05 +0100 Subject: [PATCH] core: add input/output flavors of bulk request routines Signed-off-by: Bartosz Golaszewski --- gpiod.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gpiod.h b/gpiod.h index e1ecaed..51b81dd 100644 --- a/gpiod.h +++ b/gpiod.h @@ -126,6 +126,23 @@ int gpiod_line_request_bulk(struct gpiod_line_bulk *line_bulk, const char *consumer, int *default_vals, int flags) GPIOD_API; +static inline int +gpiod_line_request_bulk_din(struct gpiod_line_bulk *line_bulk, + const char *consumer, int flags) +{ + return gpiod_line_request_bulk(line_bulk, consumer, NULL, + flags | GPIOD_REQUEST_DIRECTION_INPUT); +} + +static inline int +gpiod_line_request_bulk_dout(struct gpiod_line_bulk *line_bulk, + const char *consumer, int *default_vals, + int flags) +{ + return gpiod_line_request_bulk(line_bulk, consumer, default_vals, + flags | GPIOD_REQUEST_DIRECTION_INPUT); +} + void gpiod_line_release(struct gpiod_line *line) GPIOD_API; void gpiod_line_release_bulk(struct gpiod_line_bulk *line_bulk) GPIOD_API; -- 2.30.2