#ifndef SMALLGPIO_H_INCLUDED
#define SMALLGPIO_H_INCLUDED
#include "lpc122x.h"
// InitGPIO() turns on the GPIO and IOCON clocks
#define InitGPIO() LPC_SYSCON->SYSAHBCLKCTRL |= ((1<<6) | (1<<16))
#define PORT_BIT_COUNT 12 // up to 12 I/O lines per port
#define PORT_COUNT 4 // up to 4 ports
... |