/* Sets the direction and mode of the specified pin. 
where  */
void GPIODirModeSet(unsigned long ulPort, unsigned long ulBit, unsigned long ulPinIO)
/* Sets the direction and mode of the specified pin. 
where  */
void GPIODirModeSet(unsigned long ulPort, unsigned long ulBit, unsigned long ulPinIO)
{
    xASSERT(GPIOBaseValid(ulPort));
    xASSERT((ulPinIO == GPIO_DIR_MODE_IN) || (ulPinIO == GPIO_DIR_MODE_OUT));
    xHWREG(ulPort + GPIO_PDDR) &= ~(1 << ulBit);
    xHWREG(ulPort + GPIO_PDDR) |= (ulPinIO << ulBit);
}