LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC17xx/40xx GPIO driver

Detailed Description

Functions

STATIC INLINE void Chip_GPIO_Init (LPC_GPIO_T *pGPIO)
 Initialize GPIO block.
 
STATIC INLINE void Chip_GPIO_WritePortBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit, bool setting)
 Set a GPIO port/bit state.
 
STATIC INLINE void Chip_GPIO_WriteDirBit (LPC_GPIO_T *pGPIO, uint8_t port, uint8_t bit, bool setting)
 Set a GPIO direction.
 
STATIC INLINE bool Chip_GPIO_ReadPortBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit)
 Read a GPIO state.
 
STATIC INLINE bool Chip_GPIO_ReadDirBit (LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit)
 Read a GPIO direction (out or in)
 

Function Documentation

STATIC INLINE void Chip_GPIO_Init ( LPC_GPIO_T pGPIO)

Initialize GPIO block.

Parameters
pGPIO: The base of GPIO peripheral on the chip
Returns
Nothing

Definition at line 49 of file gpio_17xx_40xx.h.

STATIC INLINE bool Chip_GPIO_ReadDirBit ( LPC_GPIO_T pGPIO,
uint32_t  port,
uint8_t  bit 
)

Read a GPIO direction (out or in)

Parameters
pGPIO: The base of GPIO peripheral on the chip
port: GPIO port to read
bit: GPIO bit to read
Returns
true of the GPIO is an output, false if input

Definition at line 97 of file gpio_17xx_40xx.h.

STATIC INLINE bool Chip_GPIO_ReadPortBit ( LPC_GPIO_T pGPIO,
uint32_t  port,
uint8_t  bit 
)

Read a GPIO state.

Parameters
pGPIO: The base of GPIO peripheral on the chip
port: GPIO port to read
bit: GPIO bit to read
Returns
true of the GPIO is high, false if low

Definition at line 85 of file gpio_17xx_40xx.h.

STATIC INLINE void Chip_GPIO_WriteDirBit ( LPC_GPIO_T pGPIO,
uint8_t  port,
uint8_t  bit,
bool  setting 
)

Set a GPIO direction.

Parameters
pGPIO: The base of GPIO peripheral on the chip
port: GPIO port to set
bit: GPIO bit to set
setting: true for output, false for input
Returns
Nothing

Definition at line 73 of file gpio_17xx_40xx.h.

STATIC INLINE void Chip_GPIO_WritePortBit ( LPC_GPIO_T pGPIO,
uint32_t  port,
uint8_t  bit,
bool  setting 
)

Set a GPIO port/bit state.

Parameters
pGPIO: The base of GPIO peripheral on the chip
port: GPIO port to set
bit: GPIO bit to set
setting: true for high, false for low
Returns
Nothing

Definition at line 60 of file gpio_17xx_40xx.h.