aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpio/Makefile
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-04-26 04:47:09 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-06-15 03:29:04 -0400
commit2a144dd09118d9ba8cb57ef65eb573af222c455c (patch)
tree21e57956bbbbcb623cb7c55a419247b1ebf949d7 /tools/gpio/Makefile
parentd7c51b47ac11e66f547b55640405c1c474642d72 (diff)
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>
Diffstat (limited to 'tools/gpio/Makefile')
-rw-r--r--tools/gpio/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
index c155d6bc47a7..aea23949054e 100644
--- a/tools/gpio/Makefile
+++ b/tools/gpio/Makefile
@@ -1,12 +1,13 @@
1CC = $(CROSS_COMPILE)gcc 1CC = $(CROSS_COMPILE)gcc
2CFLAGS += -O2 -Wall -g -D_GNU_SOURCE 2CFLAGS += -O2 -Wall -g -D_GNU_SOURCE
3 3
4all: lsgpio 4all: lsgpio gpio-hammer
5 5
6lsgpio: lsgpio.o gpio-utils.o 6lsgpio: lsgpio.o gpio-utils.o
7gpio-hammer: gpio-hammer.o gpio-utils.o
7 8
8%.o: %.c gpio-utils.h 9%.o: %.c gpio-utils.h
9 10
10.PHONY: clean 11.PHONY: clean
11clean: 12clean:
12 rm -f *.o lsgpio 13 rm -f *.o lsgpio gpio-hammer