![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Data Structures | |
| struct | IP_GPIO_003_T |
| GPIO port register block structure. More... | |
Enumerations | |
| enum | IP_GPIOPININT_MODE_T { GPIOPININT_FALLING_EDGE = 0, GPIOPININT_ACTIVE_LOW_LEVEL = 1, GPIOPININT_RISING_EDGE = (1 << 12), GPIOPININT_ACTIVE_HIGH_LEVEL = 1 | (1 << 12), GPIOPININT_BOTH_EDGES = (1 << 24), GPIOPININT_RISING_EDGE = 0x01, GPIOPININT_FALLING_EDGE = 0x02, GPIOPININT_RISING_EDGE = 0x01, GPIOPININT_FALLING_EDGE = 0x02, GPIOPININT_ACTIVE_HIGH_LEVEL = 0x04, GPIOPININT_ACTIVE_LOW_LEVEL = 0x08 } |
Functions | |
| STATIC INLINE void | IP_GPIO_Init (IP_GPIO_003_T *pGPIO) |
| Initialize GPIO block. | |
| STATIC INLINE void | IP_GPIO_WritePort (IP_GPIO_003_T *pGPIO, uint16_t mask, uint16_t val) |
| Write data to port. | |
| STATIC INLINE void | IP_GPIO_WritePortBit (IP_GPIO_003_T *pGPIO, uint8_t pin, bool val) |
| Set state of pin. | |
| STATIC INLINE uint32_t | IP_GPIO_ReadPort (IP_GPIO_003_T *pGPIO) |
| Read port state. | |
| STATIC INLINE bool | IP_GPIO_ReadPortBit (IP_GPIO_003_T *pGPIO, uint8_t pin) |
| Read pin state. | |
| STATIC INLINE void | IP_GPIO_WriteDirBit (IP_GPIO_003_T *pGPIO, uint8_t pin, bool dir) |
| Set GPIO direction for a pin. | |
| STATIC INLINE void | IP_GPIO_SetDir (IP_GPIO_003_T *pGPIO, uint32_t bitVal, bool dir) |
| Set GPIO direction for a port. | |
| STATIC INLINE bool | IP_GPIO_ReadDirBit (IP_GPIO_003_T *pGPIO, uint8_t pin) |
| Read a GPIO direction (out or in) | |
| void | IP_GPIO_IntCmd (IP_GPIO_003_T *pGPIO, uint8_t pin, IP_GPIOPININT_MODE_T mode) |
| Configure GPIO Interrupt. | |
| STATIC INLINE bool | IP_GPIO_IntGetStatus (IP_GPIO_003_T *pGPIO, uint8_t pin) |
| Get GPIO Interrupt Status. | |
| STATIC INLINE void | IP_GPIO_IntClear (IP_GPIO_003_T *pGPIO, uint8_t pin) |
| Clear GPIO Interrupt (Edge interrupt cases only) | |
| enum IP_GPIOPININT_MODE_T |
Definition at line 163 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_Init | ( | IP_GPIO_003_T * | pGPIO | ) |
Initialize GPIO block.
| pGPIO | : the base address of the GPIO block |
Definition at line 68 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_IntClear | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin | ||
| ) |
Clear GPIO Interrupt (Edge interrupt cases only)
| pGPIO | : pointer to GPIO interrupt register block |
| pin | : pin number |
Definition at line 197 of file gpio_003.h.
| void IP_GPIO_IntCmd | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin, | ||
| IP_GPIOPININT_MODE_T | mode | ||
| ) |
Configure GPIO Interrupt.
| pGPIO | : pointer to GPIO interrupt register block |
| pin | : GPIO port number interrupt |
| mode | : Interrupt mode. |
| STATIC INLINE bool IP_GPIO_IntGetStatus | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin | ||
| ) |
Get GPIO Interrupt Status.
| pGPIO | : pointer to GPIO interrupt register block |
| pin | : pin number |
Definition at line 186 of file gpio_003.h.
| STATIC INLINE bool IP_GPIO_ReadDirBit | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin | ||
| ) |
Read a GPIO direction (out or in)
| pGPIO | : the base address of the GPIO block |
| pin | : pin number (0-11) |
Definition at line 158 of file gpio_003.h.
| STATIC INLINE uint32_t IP_GPIO_ReadPort | ( | IP_GPIO_003_T * | pGPIO | ) |
Read port state.
| pGPIO | : the base address of the GPIO block |
Definition at line 102 of file gpio_003.h.
| STATIC INLINE bool IP_GPIO_ReadPortBit | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin | ||
| ) |
Read pin state.
| pGPIO | : the base address of the GPIO block |
| pin | : pin number (0-11) |
Definition at line 113 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_SetDir | ( | IP_GPIO_003_T * | pGPIO, |
| uint32_t | bitVal, | ||
| bool | dir | ||
| ) |
Set GPIO direction for a port.
| pGPIO | : the base address of the GPIO block |
| bitVal | : bit value |
| dir | : true for output, false for input |
Definition at line 142 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_WriteDirBit | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin, | ||
| bool | dir | ||
| ) |
Set GPIO direction for a pin.
| pGPIO | : the base address of the GPIO block |
| pin | : pin number (0-11) |
| dir | : true for output, false for input |
Definition at line 125 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_WritePort | ( | IP_GPIO_003_T * | pGPIO, |
| uint16_t | mask, | ||
| uint16_t | val | ||
| ) |
Write data to port.
| pGPIO | : the base address of the GPIO block |
| mask | : determines which pins will be written. bits [11:0] address pins PIOn.0~PIOn.11. If bit's value is 1, the state of the relevant pin is updated. Otherwise, it is unchanged. |
| val | : bit values. |
Definition at line 80 of file gpio_003.h.
| STATIC INLINE void IP_GPIO_WritePortBit | ( | IP_GPIO_003_T * | pGPIO, |
| uint8_t | pin, | ||
| bool | val | ||
| ) |
Set state of pin.
| pGPIO | : the base address of the GPIO block |
| pin | : pin number (0-11) |
| val | : true for high, false for low |
Definition at line 92 of file gpio_003.h.