From d25ef4db1849683360c34a2888df6bd5a9148a67 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 5 Jan 2017 14:59:36 +0100 Subject: [PATCH] core: fix gpiod_simple_get_value() We should set direction to INPUT. Signed-off-by: Bartosz Golaszewski --- core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.c b/core.c index cedb15d..4fa9d0d 100644 --- a/core.c +++ b/core.c @@ -108,7 +108,7 @@ int gpiod_simple_get_value(const char *device, unsigned int offset) memset(&config, 0, sizeof(config)); config.consumer = libgpiod_consumer; - config.direction = GPIOD_DIRECTION_AS_IS; + config.direction = GPIOD_DIRECTION_INPUT; chip = gpiod_chip_open_lookup(device); if (!chip) -- 2.30.2