/* Get pointer to GPIO peripheral due to GPIO port.  */
static uint32_t* PIN_GetPointer(uint8_t portnum, uint8_t pinnum)
/* Get pointer to GPIO peripheral due to GPIO port.  */
static uint32_t* PIN_GetPointer(uint8_t portnum, uint8_t pinnum)
{
    uint32_t *pPIN = NULL;
    pPIN = (uint32_t *)(LPC_IOCON_BASE + ((portnum * 32 + pinnum)*sizeof(uint32_t)));
    return pPIN;
}