/* Gets the number of bits transferred per frame.  */
unsigned char SPIBitLengthGet(unsigned long ulBase)
/* Gets the number of bits transferred per frame.  */
unsigned char SPIBitLengthGet(unsigned long ulBase)
{
    xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE)||(ulBase == SPI3_BASE) );
    return ((xHWREG(ulBase + SPI_CNTRL) & SPI_CNTRL_TX_BIT_LEN_M)             
            >> SPI_CNTRL_TX_BIT_LEN_S);
}