/* Write 0 or 1 to select gpio pins.  */
void GPIOPinWrite(unsigned long ulPort, unsigned long ulPins, unsigned long ulVal)
/* Write 0 or 1 to select gpio pins.  */
void GPIOPinWrite(unsigned long ulPort, unsigned long ulPins, unsigned long ulVal)
{
    xHWREG(ulPort + FIOMASK) = ~ulPins;
    if(0 != ulVal)
    {
        xHWREG(ulPort + FIOSET)   =  ulPins;
    }
    else
    {
        xHWREG(ulPort + FIOCLR)   =  ulPins;
    }
}