Commit Graph

5 Commits

Author SHA1 Message Date
Javier Viguera 67b6d9ed60 apix-gpio-example: fix invalid NULL check for controller names
Replace incorrect NULL pointer checks on button_ctrl and led_ctrl with
string emptiness checks, since these are fixed-size character arrays and
never NULL.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2025-06-18 18:07:11 +02:00
Hector Bujanda a2412edf38 apix-gpio-example: make use of libgpiod
From the user point of view the the main change is the addition of function
ldx_gpio_request_by_controller() which selects the gpio to use using following
arguments:
   - controller: The controller name or alias of the GPIO to request.
   - line: The line number of the GPIO to request.
   - request_mode argument has been removed since that argument only has
     sense for sysfs related functions as it controls the way the line is
     exported and unexported.

The configuration file entries change to following format:
   - USER_LED = mca-gpio,12
   - USER_BUTTON = mca-gpio,10

Also improved argument parsing and help

https://jira.digi.com/browse/DEL-6425

Signed-off-by: Hector Bujanda hector.bujanda@digi.com
2020-04-27 11:00:22 +02:00
Francisco Gil 3b7bbdbf65 dey-examples: Rework the examples to be launch-ready
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2017-11-30 13:12:58 +01:00
Francisco Gil Martinez d574d6b748 examples refactor the examples
Signed-off-by: Francisco Gil Martinez <francisco.gilmartinez@digi.com>
2017-10-06 16:18:16 +02:00
Javier Viguera 1e2358f5bf dey-examples: add libdigiapix GPIO example
https://jira.digi.com/browse/DEL-4795

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2017-09-14 16:42:14 +02:00