From 47aedf5a4388822b3e595955653c16e95809d3be Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 23 Jun 2017 12:37:21 +0200 Subject: [PATCH] core: event: use correct flags when requesting events We must use the GPIOEVENT_REQUEST_* flags, not GPIOEVENT_EVENT_* since the latter are only meaningful when receiving event info. Signed-off-by: Bartosz Golaszewski --- src/lib/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/core.c b/src/lib/core.c index 1d46a04..680f5c1 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -822,9 +822,9 @@ int gpiod_line_event_request(struct gpiod_line *line, req->handleflags |= GPIOHANDLE_REQUEST_ACTIVE_LOW; if (config->event_type == GPIOD_EVENT_RISING_EDGE) - req->eventflags |= GPIOEVENT_EVENT_RISING_EDGE; + req->eventflags |= GPIOEVENT_REQUEST_RISING_EDGE; else if (config->event_type == GPIOD_EVENT_FALLING_EDGE) - req->eventflags |= GPIOEVENT_EVENT_FALLING_EDGE; + req->eventflags |= GPIOEVENT_REQUEST_FALLING_EDGE; else if (config->event_type == GPIOD_EVENT_BOTH_EDGES) req->eventflags |= GPIOEVENT_REQUEST_BOTH_EDGES; -- 2.30.2