core: allow to read values of lines configured for events
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 23 Jan 2017 15:01:28 +0000 (16:01 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 23 Jan 2017 15:01:28 +0000 (16:01 +0100)
commitce18fcfb052b5c8b3b3d4bea4ba1cdcdb591f94a
treed9e3596d32c89b2bead0080cc3aa9609653220d4
parent1572d90586791f3987abb4c50dc82ff4c597bfc2
core: allow to read values of lines configured for events

The kernel allows us to read values of lines on which we're listening
for events, but libgpiod bails out if the user tries to do it.

Modify gpiod_line_get_value_bulk() to select the correct file
descriptor, depending on how the line object is configured and
allow reading values for both normally exported and monitored lines.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/lib/core.c