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

Detailed Description

Typically used for 175x/6x/7x/8x and 407x/8x devices.

Data Structures

struct  IP_GPIO_002_T
 GPIO port (GPIO_PORT) for LPC175x_6x, LPC177x_8x and LPC407x_8x. More...
 

Macros

#define GPIO_PORT_BITS   32
 

Functions

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

Macro Definition Documentation

#define GPIO_PORT_BITS   32

Definition at line 48 of file gpio_002.h.

Function Documentation

STATIC INLINE void IP_GPIO_Init ( IP_GPIO_002_T pGPIO)

Initialize GPIO block.

Parameters
pGPIO: The Base Address of the GPIO block (from GPIO0 to GPIO5)
Returns
Nothing

Definition at line 68 of file gpio_002.h.

STATIC INLINE bool IP_GPIO_ReadDirBit ( IP_GPIO_002_T pGPIO,
uint8_t  Bit 
)

Read a GPIO direction (out or in)

Parameters
pGPIO: The Base Address of the GPIO block (from GPIO0 to GPIO5)
Bit: GPIO bit to read
Returns
true of the GPIO is an output, false if input

Definition at line 122 of file gpio_002.h.

STATIC INLINE bool IP_GPIO_ReadPortBit ( IP_GPIO_002_T pGPIO,
uint8_t  Bit 
)

Read a GPIO state.

Parameters
pGPIO: The Base Address of the GPIO block (from GPIO0 to GPIO5)
Bit: GPIO bit to read
Returns
true of the GPIO is high, false if low

Definition at line 111 of file gpio_002.h.

STATIC INLINE void IP_GPIO_WriteDirBit ( IP_GPIO_002_T pGPIO,
uint8_t  Bit,
bool  Setting 
)

Set a GPIO direction.

Parameters
pGPIO: The Base Address of the GPIO block (from GPIO0 to GPIO5)
Bit: GPIO bit number to be configured
Setting: true for output, false for input
Returns
Nothing

Definition at line 95 of file gpio_002.h.

STATIC INLINE void IP_GPIO_WritePortBit ( IP_GPIO_002_T pGPIO,
uint8_t  Bit,
bool  Setting 
)

Set a GPIO port/bit state.

Parameters
pGPIO: The Base Address of the GPIO block (from GPIO0 to GPIO5)
Bit: GPIO bit number to be set/cleared
Setting: true for high, false for low
Returns
Nothing

Definition at line 78 of file gpio_002.h.