LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
Data Structures | Macros | Functions
CHIP: LPC18xx/43xx GPIO group driver

Detailed Description

Data Structures

struct  LPC_GPIOGROUPINT_T
 GPIO grouped interrupt register block structure. More...
 

Macros

#define GPIOGR_INT   (1 << 0)
 
#define GPIOGR_COMB   (1 << 1)
 
#define GPIOGR_TRIG   (1 << 2)
 

Functions

STATIC INLINE void Chip_GPIOGP_ClearIntStatus (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Clear interrupt pending status for the selected group. More...
 
STATIC INLINE bool Chip_GPIOGP_GetIntStatus (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Returns current GPIO group inetrrupt pending status. More...
 
STATIC INLINE void Chip_GPIOGP_SelectOrMode (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Selected GPIO group functionality for trigger on any pin in group (OR mode) More...
 
STATIC INLINE void Chip_GPIOGP_SelectAndMode (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Selected GPIO group functionality for trigger on all matching pins in group (AND mode) More...
 
STATIC INLINE void Chip_GPIOGP_SelectEdgeMode (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Selected GPIO group functionality edge trigger mode. More...
 
STATIC INLINE void Chip_GPIOGP_SelectLevelMode (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group)
 Selected GPIO group functionality level trigger mode. More...
 
STATIC INLINE void Chip_GPIOGP_SelectLowLevel (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group, uint8_t port, uint32_t pinMask)
 Set selected pins for the group and port to low level trigger. More...
 
STATIC INLINE void Chip_GPIOGP_SelectHighLevel (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group, uint8_t port, uint32_t pinMask)
 Set selected pins for the group and port to high level trigger. More...
 
STATIC INLINE void Chip_GPIOGP_DisableGroupPins (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group, uint8_t port, uint32_t pinMask)
 Disabled selected pins for the group interrupt. More...
 
STATIC INLINE void Chip_GPIOGP_EnableGroupPins (LPC_GPIOGROUPINT_T *pGPIOGPINT, uint8_t group, uint8_t port, uint32_t pinMask)
 Enable selected pins for the group interrupt. More...
 

Macro Definition Documentation

#define GPIOGR_COMB   (1 << 1)

GPIO interrupt OR(0)/AND(1) mode bit

Definition at line 59 of file gpiogroup_18xx_43xx.h.

#define GPIOGR_INT   (1 << 0)

LPC18xx/43xx GPIO group bit definitionsGPIO interrupt pending/clear bit

Definition at line 58 of file gpiogroup_18xx_43xx.h.

#define GPIOGR_TRIG   (1 << 2)

GPIO interrupt edge(0)/level(1) mode bit

Definition at line 60 of file gpiogroup_18xx_43xx.h.

Function Documentation

STATIC INLINE void Chip_GPIOGP_ClearIntStatus ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Clear interrupt pending status for the selected group.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
None

Definition at line 68 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_DisableGroupPins ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group,
uint8_t  port,
uint32_t  pinMask 
)

Disabled selected pins for the group interrupt.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
port: GPIO port number
pinMask: Or'ed value of pins to disable interrupt for (bit 0 = pin 0, 1 = pin1, etc.)
Returns
None
Note
Disabled pins do not contrinute to the group interrupt.

Definition at line 172 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_EnableGroupPins ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group,
uint8_t  port,
uint32_t  pinMask 
)

Enable selected pins for the group interrupt.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
port: GPIO port number
pinMask: Or'ed value of pins to enable interrupt for (bit 0 = pin 0, 1 = pin1, etc.)
Returns
None
Note
Enabled pins contribute to the group interrupt.

Definition at line 189 of file gpiogroup_18xx_43xx.h.

STATIC INLINE bool Chip_GPIOGP_GetIntStatus ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Returns current GPIO group inetrrupt pending status.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
true if the group interrupt is pending, otherwise false.

Definition at line 82 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectAndMode ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Selected GPIO group functionality for trigger on all matching pins in group (AND mode)

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
None

Definition at line 104 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectEdgeMode ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Selected GPIO group functionality edge trigger mode.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
None

Definition at line 115 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectHighLevel ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group,
uint8_t  port,
uint32_t  pinMask 
)

Set selected pins for the group and port to high level trigger.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
port: GPIO port number
pinMask: Or'ed value of pins to select for high level (bit 0 = pin 0, 1 = pin1, etc.)
Returns
None

Definition at line 155 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectLevelMode ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Selected GPIO group functionality level trigger mode.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
None

Definition at line 126 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectLowLevel ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group,
uint8_t  port,
uint32_t  pinMask 
)

Set selected pins for the group and port to low level trigger.

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
port: GPIO port number
pinMask: Or'ed value of pins to select for low level (bit 0 = pin 0, 1 = pin1, etc.)
Returns
None

Definition at line 139 of file gpiogroup_18xx_43xx.h.

STATIC INLINE void Chip_GPIOGP_SelectOrMode ( LPC_GPIOGROUPINT_T pGPIOGPINT,
uint8_t  group 
)

Selected GPIO group functionality for trigger on any pin in group (OR mode)

Parameters
pGPIOGPINT: Pointer to GPIO group register block
group: GPIO group number
Returns
None

Definition at line 93 of file gpiogroup_18xx_43xx.h.