From 996e9c37c47ad5e135bea05590843f2963cfa257 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 11 Oct 2017 18:33:03 +0200 Subject: simple-api: modify the order of arguments in simple loop routines Move the consumer string after the active_low property. Signed-off-by: Bartosz Golaszewski --- include/gpiod.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/gpiod.h b/include/gpiod.h index bc39aa9..0f2839d 100644 --- a/include/gpiod.h +++ b/include/gpiod.h @@ -211,10 +211,10 @@ typedef int (*gpiod_simple_event_poll_cb)(unsigned int, /** * @brief Wait for events on a single GPIO line. - * @param consumer Name of the consumer. * @param device Name, path or number of the gpiochip. * @param offset GPIO line offset to monitor. * @param active_low The active state of this line - true if low. + * @param consumer Name of the consumer. * @param timeout Maximum wait time for each iteration. * @param poll_cb Callback function to call when waiting for events. * @param event_cb Callback function to call on event occurrence. @@ -224,8 +224,8 @@ typedef int (*gpiod_simple_event_poll_cb)(unsigned int, * The poll callback can be NULL in which case the routine will fall back to * a basic, ppoll() based callback. */ -int gpiod_simple_event_loop(const char *consumer, const char *device, - unsigned int offset, bool active_low, +int gpiod_simple_event_loop(const char *device, unsigned int offset, + bool active_low, const char *consumer, const struct timespec *timeout, gpiod_simple_event_poll_cb poll_cb, gpiod_simple_event_handle_cb event_cb, @@ -233,11 +233,11 @@ int gpiod_simple_event_loop(const char *consumer, const char *device, /** * @brief Wait for events on multiple GPIO lines. - * @param consumer Name of the consumer. * @param device Name, path or number of the gpiochip. * @param offsets Array of GPIO line offsets to monitor. * @param num_lines Number of lines to monitor. * @param active_low The active state of this line - true if low. + * @param consumer Name of the consumer. * @param timeout Maximum wait time for each iteration. * @param poll_cb Callback function to call when waiting for events. * @param event_cb Callback function to call on event occurrence. @@ -246,9 +246,10 @@ int gpiod_simple_event_loop(const char *consumer, const char *device, * * The callback functions work just like in the single line variant. */ -int gpiod_simple_event_loop_multiple(const char *consumer, const char *device, +int gpiod_simple_event_loop_multiple(const char *device, const unsigned int *offsets, unsigned int num_lines, bool active_low, + const char *consumer, const struct timespec *timeout, gpiod_simple_event_poll_cb poll_cb, gpiod_simple_event_handle_cb event_cb, -- cgit v1.2.3