LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gpio_18xx_43xx.c
Go to the documentation of this file.
1 
26 #include "gpio_18xx_43xx.h"
27 
28 /*****************************************************************************
29  * Private types/enumerations/variables
30  ****************************************************************************/
31 
32 /*****************************************************************************
33  * Public types/enumerations/variables
34  ****************************************************************************/
35 
36 /*****************************************************************************
37  * Private functions
38  ****************************************************************************/
39 
40 /*****************************************************************************
41  * Public functions
42  ****************************************************************************/
43 
44 /* Set Direction for a GPIO port */
45 void Chip_GPIO_SetDir(uint8_t portNum, uint32_t bitValue, uint8_t out)
46 {
47  if (out) {
48  LPC_GPIO_PORT->DIR[portNum] |= bitValue;
49  }
50  else {
51  LPC_GPIO_PORT->DIR[portNum] &= ~bitValue;
52  }
53 }