# GPIO ## **Overview** Provides standard general-purpose input/output \(GPIO\) interfaces for driver development. You can use this module to perform operations on a GPIO pin, including setting the input/output direction, reading/writing the level value, and setting the interrupt service routine \(ISR\) function. **Since:** 1.0 ## **Summary** ## Files
GpioIrqFunc) (uint16_t gpio, void *data) |
Defines the function type of a GPIO interrupt service routine (ISR). |
GpioValue { GPIO_VAL_LOW = 0, GPIO_VAL_HIGH = 1, GPIO_VAL_ERR } |
|
GpioDirType { GPIO_DIR_IN = 0, GPIO_DIR_OUT = 1, GPIO_DIR_ERR } |
GpioRead (uint16_t gpio, uint16_t *val) |
|
GpioWrite (uint16_t gpio, uint16_t val) |
|
GpioSetDir (uint16_t gpio, uint16_t dir) |
|
GpioGetDir (uint16_t gpio, uint16_t *dir) |
|
GpioSetIrq (uint16_t gpio, uint16_t mode, GpioIrqFunc func, void *arg) |
|
GpioUnSetIrq (uint16_t gpio) |
|
GpioEnableIrq (uint16_t gpio) |
|
GpioDisableIrq (uint16_t gpio) |
| gpio | Indicates the GPIO number of the ISR. |
| data | Indicates the pointer to the private data passed to this ISR (The data is specified when the ISR is registered). |
| GPIO_DIR_IN | |
| GPIO_DIR_OUT | |
| GPIO_DIR_ERR |
| GPIO_VAL_LOW | |
| GPIO_VAL_HIGH | |
| GPIO_VAL_ERR |
| gpio | Indicates the GPIO pin number. |
| gpio | Indicates the GPIO pin number. |
| gpio | Indicates the GPIO pin number. |
| dir | Indicates the pointer to the obtained input/output direction. For details, see GpioDirType. |
| gpio | Indicates the GPIO pin number. |
| val | Indicates the pointer to the read level value. For details, see GpioValue. |
| gpio | Indicates the GPIO pin number. |
| dir | Indicates the direction to set. For details, see GpioDirType. |
| gpio | Indicates the GPIO pin number. |
| mode | Indicates the interrupt trigger mode. For details, see OSAL_IRQF_TRIGGER_RISING. |
| func | Indicates the ISR function to set, which is specified by GpioIrqFunc. |
| arg | Indicates the pointer to the parameters passed to the ISR function. |
| gpio | Indicates the GPIO pin number. |
| gpio | Indicates the GPIO pin number. |
| val | Indicates the level value to be written. For details, see GpioValue. |