aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpio/gpio-event-mon.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gpio/gpio-event-mon.c')
-rw-r--r--tools/gpio/gpio-event-mon.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c
index 1c14c2595158..dac4d4131d9b 100644
--- a/tools/gpio/gpio-event-mon.c
+++ b/tools/gpio/gpio-event-mon.c
@@ -14,6 +14,7 @@
14#include <unistd.h> 14#include <unistd.h>
15#include <stdlib.h> 15#include <stdlib.h>
16#include <stdbool.h> 16#include <stdbool.h>
17#include <stdint.h>
17#include <stdio.h> 18#include <stdio.h>
18#include <dirent.h> 19#include <dirent.h>
19#include <errno.h> 20#include <errno.h>
@@ -23,12 +24,13 @@
23#include <getopt.h> 24#include <getopt.h>
24#include <inttypes.h> 25#include <inttypes.h>
25#include <sys/ioctl.h> 26#include <sys/ioctl.h>
27#include <sys/types.h>
26#include <linux/gpio.h> 28#include <linux/gpio.h>
27 29
28int monitor_device(const char *device_name, 30int monitor_device(const char *device_name,
29 unsigned int line, 31 unsigned int line,
30 u_int32_t handleflags, 32 uint32_t handleflags,
31 u_int32_t eventflags, 33 uint32_t eventflags,
32 unsigned int loops) 34 unsigned int loops)
33{ 35{
34 struct gpioevent_request req; 36 struct gpioevent_request req;
@@ -145,8 +147,8 @@ int main(int argc, char **argv)
145 const char *device_name = NULL; 147 const char *device_name = NULL;
146 unsigned int line = -1; 148 unsigned int line = -1;
147 unsigned int loops = 0; 149 unsigned int loops = 0;
148 u_int32_t handleflags = GPIOHANDLE_REQUEST_INPUT; 150 uint32_t handleflags = GPIOHANDLE_REQUEST_INPUT;
149 u_int32_t eventflags = 0; 151 uint32_t eventflags = 0;
150 int c; 152 int c;
151 153
152 while ((c = getopt(argc, argv, "c:n:o:dsrf?")) != -1) { 154 while ((c = getopt(argc, argv, "c:n:o:dsrf?")) != -1) {