/* Enable/disable the 3 wire feature of the specified SPI port.  */
void SPI3WireFunction(unsigned long ulBase, xtBoolean xtEnable)
/* Enable/disable the 3 wire feature of the specified SPI port.  */
void SPI3WireFunction(unsigned long ulBase, xtBoolean xtEnable)
{
    xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE)||(ulBase == SPI3_BASE) );
    if (xtEnable)
    {
        xHWREG(ulBase + SPI_CNTRL) |= SPI_CNTRL_SLVSEL;
        xHWREG(ulBase + SPI_SSR) |= SPI_SSR_SLV3WIRE;
    }
    else
    {
        xHWREG(ulBase + SPI_SSR) &= ~SPI_SSR_SLV3WIRE;
        xHWREG(ulBase + SPI_CNTRL) &= ~SPI_CNTRL_SLVSEL;
    }
}