/* Gets the direction and mode of a pin. */
unsigned long GPIODirModeGet(unsigned long ulPort, unsigned long ulBit)
/* Gets the direction and mode of a pin. */
unsigned long GPIODirModeGet(unsigned long ulPort, unsigned long ulBit)
{
    xASSERT(GPIOBaseValid(ulPort));
    xASSERT(ulBit < 16);
    return ((xHWREG(ulPort + GPIO_PDDR) >> ulBit) & 0x00000001);
}