From: Bartosz Golaszewski Date: Thu, 5 Jan 2017 13:59:36 +0000 (+0100) Subject: core: fix gpiod_simple_get_value() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d25ef4db1849683360c34a2888df6bd5a9148a67;p=qemu-gpiodev%2Flibgpiod.git core: fix gpiod_simple_get_value() We should set direction to INPUT. Signed-off-by: Bartosz Golaszewski --- 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)