/* Enable/disable the 3 wire feature of the specified SPI port. 
In no slave select signal mode, the SS_LTRIG, SPI_SSR, shall be set as 1. */
void SPI3WireFunction(unsigned long ulBase, xtBoolean xtEnable)
/* Enable/disable the 3 wire feature of the specified SPI port. 
In no slave select signal mode, the SS_LTRIG, SPI_SSR, shall be set as 1. */
void SPI3WireFunction(unsigned long ulBase, xtBoolean xtEnable)
{
    xASSERT(ulBase == SPI0_BASE);
    if (xtEnable)
    {
        xHWREG(ulBase + SPI_CNTRL2) |= SPI_CNTRL2_NOSLVSEL;
        xHWREG(ulBase + SPI_SSR) |= SPI_SS_LTRIG;
    }
    else
    {
        xHWREG(ulBase + SPI_CNTRL2) &= ~SPI_CNTRL2_NOSLVSEL;
    }
}