core: set the active state using the request flags
authorBartosz Golaszewski <bartekgola@gmail.com>
Wed, 12 Jul 2017 18:17:01 +0000 (20:17 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 12 Jul 2017 18:17:01 +0000 (20:17 +0200)
commit8e164e9926eb32f16382b5235bca550aff570648
tree2ecb93892db2a40df1aa2bb41cf00de0e5ebe5bf
parent259dd5c64bec65dab0d514d28fcdb2d6d3640964
core: set the active state using the request flags

Having to always set the active state in the line request config
structure makes users create unnecessary boilerplate code. Remove the
active state field from the config structure and add a new flag, which
when set, sets the active state to low, while high is the default.

This patch updates the main request function and all the callers - we
still need to update all the helper request routines.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
include/gpiod.h
src/lib/core.c
src/tools/gpiomon.c
tests/tests-line.c