core: add non-closing gpiochip iterator function and foreach macro
authorClemens Gruber <clemens.gruber@pqgruber.com>
Tue, 31 Jan 2017 21:08:02 +0000 (22:08 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Wed, 1 Feb 2017 10:51:58 +0000 (11:51 +0100)
commit4110ea28040f017a4664afdca35e6bf05985c8c8
tree1f9e706eee7caa7bab7f5c325a7ea900fc762deb
parente0b6e5460af2e675d6905a7f1a1eccc2f4fbc624
core: add non-closing gpiochip iterator function and foreach macro

Allows users to iterate over the gpiochips without closing them
automatically. The lines can then be used during the runtime of the
program. The user is responsible for closing the chips after they are
no longer needed.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
include/gpiod.h
src/lib/core.c