# GPIO - [Overview](#section1158330629165623) - [Summary](#section1514023225165623) - [Files](#files) - [Typedefs](#typedef-members) - [Enumerations](#enum-members) - [Functions](#func-members) - [Details](#section600064076165623) - [Typedef](#section550945231165623) - [GpioIrqFunc](#ga8f3b7d0f0aaa1da8117781efe4b1670e) - [Enumeration Type](#section1554549735165623) - [GpioDirType](#ga71f27d3ba7ca04d9448199fca38ae19d) - [GpioIrqType](#ga55c74906cd839809c65a2291ce19e71a) - [GpioValue](#ga6a25a3efddf2301c7b01a7f0af44fb11) - [Function](#section821997884165623) - [GpioDisableIrq\(\)](#gafa01dc510f26d5aff102d72679920929) - [GpioEnableIrq\(\)](#gafcf00796a949245d665e672ae0294aee) - [GpioGetDir\(\)](#ga6eb1536930b7ec5e263667ba30dfc6fb) - [GpioRead\(\)](#ga267cb09db1f12ac3f08f847e4141f3c5) - [GpioSetDir\(\)](#ga5c628216d209fa76c69eca69856bc0ae) - [GpioSetIrq\(\)](#ga6ea5d16b8d73cb74e36d367f05cb7f6e) - [GpioUnSetIrq\(\)](#ga0e417971d72956f64a3160525c2be19f) - [GpioWrite\(\)](#ga7dee8242ba9335b3217635ba64764bc4) ## **Overview** **Description:** 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 } |
|
GpioIrqType { GPIO_IRQ_TRIGGER_NONE = OSAL_IRQF_TRIGGER_NONE, GPIO_IRQ_TRIGGER_RISING = OSAL_IRQF_TRIGGER_RISING, GPIO_IRQ_TRIGGER_FALLING = OSAL_IRQF_TRIGGER_FALLING, GPIO_IRQ_TRIGGER_HIGH = OSAL_IRQF_TRIGGER_HIGH, GPIO_IRQ_TRIGGER_LOW = OSAL_IRQF_TRIGGER_LOW, GPIO_IRQ_USING_THREAD = (0x1 << 8) } |
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_IRQ_TRIGGER_NONE | |
| GPIO_IRQ_TRIGGER_RISING | |
| GPIO_IRQ_TRIGGER_FALLING | |
| GPIO_IRQ_TRIGGER_HIGH | |
| GPIO_IRQ_TRIGGER_LOW | |
| GPIO_IRQ_USING_THREAD |
| 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. |