35 #include "sys_config.h"
47 #define GPIO_PORT_BITS 32
49 #if defined(CHIP_LPC11UXX)
50 #define GPIO_PORT_COUNT 2
53 #if defined(CHIP_LPC18XX) || defined(CHIP_LPC43XX)
54 #define GPIO_PORT_COUNT 6
61 __IO uint8_t B[GPIO_PORT_COUNT][32];
62 __I uint8_t RESERVED0[4096 - (GPIO_PORT_COUNT * 32 *
sizeof(uint8_t))];
64 __I uint8_t RESERVED1[4096 - (GPIO_PORT_COUNT * 32 *
sizeof(
uint32_t))];
98 pGPIO->
B[Port][Bit] = Setting;
112 pGPIO->
DIR[Port] |= 1UL << Bit;
115 pGPIO->
DIR[Port] &= ~(1UL << Bit);
128 return (
bool) pGPIO->
B[Port][Bit];
140 return (
bool) (((pGPIO->
DIR[Port]) >> Bit) & 1);