1 #ifndef __INCLUDE_GPIO_H__
2 #define __INCLUDE_GPIO_H__
6 int nr
; /* GPIO number */
7 int mode
; /* GPIO mode (input=0/output=1) */
10 #define GPIO_MODE_INPUT 0
11 #define GPIO_MODE_OUTPUT 1
15 /* request access to a gpio */
16 int gpio_claim(char *owner
, int nr
, struct gpio
**gpio
);
18 /* Configure the GPIO for a certain purpose */
19 int gpio_pin_mode(struct gpio
*gpio
, int mode
);
21 /* Set the value for a GPIO */
22 int gpio_set(struct gpio
*gpio
, int value
);
24 /* Read the current value of the GPIO */
25 int gpio_read(struct gpio
*gpio
, int *value
);
27 /* Read and clear the value interrupt value of the GPIO */
28 int gpio_intr_read(struct gpio
*gpio
, int *value
);
31 int gpio_intr_message(message
* m
);
34 #endif /* __INCLUDE_GPIO_H__ */