LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IP: GPIO register block and driver

Data Structures

struct  IP_GPIO_001_Type
 GPIO port register block structure. More...
 

Macros

#define GPIO_PORT_BITS   32
 

Functions

STATIC INLINE void IP_GPIO_Init (IP_GPIO_001_Type *pGPIO)
 Initialize GPIO block.
 
STATIC INLINE void IP_GPIO_WritePortBit (IP_GPIO_001_Type *pGPIO, uint32_t Port, uint8_t Bit, bool Setting)
 Set a GPIO port/bit state.
 
STATIC INLINE void IP_GPIO_WriteDirBit (IP_GPIO_001_Type *pGPIO, uint32_t Port, uint8_t Bit, bool Setting)
 Seta GPIO direction.
 
STATIC INLINE bool IP_GPIO_ReadPortBit (IP_GPIO_001_Type *pGPIO, uint32_t Port, uint8_t Bit)
 Read a GPIO state.
 
STATIC INLINE bool IP_GPIO_ReadDirBit (IP_GPIO_001_Type *pGPIO, uint32_t Port, uint8_t Bit)
 Read a GPIO direction (out ot in)
 

Detailed Description

Macro Definition Documentation

#define GPIO_PORT_BITS   32

Definition at line 47 of file gpio_001.h.

Function Documentation

STATIC INLINE void IP_GPIO_Init ( IP_GPIO_001_Type pGPIO)

Initialize GPIO block.

Parameters
pGPIO: The Base Address of the GPIO block
Returns
Nothing

Definition at line 85 of file gpio_001.h.

STATIC INLINE bool IP_GPIO_ReadDirBit ( IP_GPIO_001_Type pGPIO,
uint32_t  Port,
uint8_t  Bit 
)

Read a GPIO direction (out ot in)

Parameters
pGPIO: The Base Address of the GPIO block
Port: GPIO port to read
Bit: GPIO bit to read
Returns
true of the GPIO is an output, false if input

Definition at line 138 of file gpio_001.h.

STATIC INLINE bool IP_GPIO_ReadPortBit ( IP_GPIO_001_Type pGPIO,
uint32_t  Port,
uint8_t  Bit 
)

Read a GPIO state.

Parameters
pGPIO: The Base Address of the GPIO block
Port: GPIO port to read
Bit: GPIO bit to read
Returns
true of the GPIO is high, false if low

Definition at line 126 of file gpio_001.h.

STATIC INLINE void IP_GPIO_WriteDirBit ( IP_GPIO_001_Type pGPIO,
uint32_t  Port,
uint8_t  Bit,
bool  Setting 
)

Seta GPIO direction.

Parameters
pGPIO: The Base Address of the GPIO block
Port: GPIO port to set
Bit: GPIO bit to set
Setting: true for output, false for input
Returns
Nothing

Definition at line 109 of file gpio_001.h.

STATIC INLINE void IP_GPIO_WritePortBit ( IP_GPIO_001_Type pGPIO,
uint32_t  Port,
uint8_t  Bit,
bool  Setting 
)

Set a GPIO port/bit state.

Parameters
pGPIO: The Base Address of the GPIO block
Port: GPIO port to set
Bit: GPIO bit to set
Setting: true for high, false for low
Returns
Nothing

Definition at line 96 of file gpio_001.h.