ldivmod, uldivmod: fix qdivrem calls
[minix.git] / include / minix / gpio.h
blobd07e9f30680da70a79e350a232cf13f2f88d3071
1 #ifndef __INCLUDE_GPIO_H__
2 #define __INCLUDE_GPIO_H__
4 struct gpio
6 int nr; /* GPIO number */
7 int mode; /* GPIO mode (input=0/output=1) */
8 };
10 #define GPIO_MODE_INPUT 0
11 #define GPIO_MODE_OUTPUT 1
13 int gpio_init();
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);
30 /* Interrupt hook */
31 int gpio_intr_message(message * m);
33 int gpio_release();
34 #endif /* __INCLUDE_GPIO_H__ */