]> git.karo-electronics.de Git - linux-beck.git/commit
tools/gpio: add the gpio-hammer tool
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 26 Apr 2016 08:47:09 +0000 (10:47 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 15 Jun 2016 07:29:04 +0000 (09:29 +0200)
commit2a144dd09118d9ba8cb57ef65eb573af222c455c
tree21e57956bbbbcb623cb7c55a419247b1ebf949d7
parentd7c51b47ac11e66f547b55640405c1c474642d72
tools/gpio: add the gpio-hammer tool

The gpio-hammer is used from userspace as an example of how
to retrieve a GPIO handle for one or several GPIO lines and
hammer the outputs from low to high and back again. It will
pulse the selected lines once per second for a specified
number of times or indefinitely if no loop count is
supplied.

Example output:
$ gpio-hammer -n gpiochip0 -o5 -o6 -o7
Hammer lines [5, 6, 7] on gpiochip0, initial states: [1, 1, 1]
[-] [5: 0, 6: 0, 7: 0]

Tested-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
tools/gpio/Makefile
tools/gpio/gpio-hammer.c [new file with mode: 0644]