diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2017-10-11 18:33:03 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bartekgola@gmail.com> | 2017-10-11 18:33:03 +0200 |
commit | 996e9c37c47ad5e135bea05590843f2963cfa257 (patch) | |
tree | 4beb4370dc596d64107ee52d23fa44dca592be62 /include | |
parent | b493015722eb77940803603ed625389fb9e235f1 (diff) | |
download | external_libgpiod-996e9c37c47ad5e135bea05590843f2963cfa257.tar.gz external_libgpiod-996e9c37c47ad5e135bea05590843f2963cfa257.tar.bz2 external_libgpiod-996e9c37c47ad5e135bea05590843f2963cfa257.zip |
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 <bartekgola@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gpiod.h | 11 |
1 files changed, 6 insertions, 5 deletions
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, |