/* Gets the number of bits transferred per frame. This function gets the number of bits transferred per frame.  */
unsigned long xSPIBitLengthGet(unsigned long ulBase)
/* Gets the number of bits transferred per frame. This function gets the number of bits transferred per frame.  */
unsigned long xSPIBitLengthGet(unsigned long ulBase)
{
    unsigned long ulTmpReg = 0;
    xASSERT(ulBase == SPI0_BASE);
    ulTmpReg = xHWREG(ulBase + S0SPCR);
    if(ulTmpReg & S0SPCR_BIT_EN)
    {
        if(ulTmpReg & S0SPCR_BITS_M)
        {
            return ((ulTmpReg &  S0SPCR_BITS_M) >> S0SPCR_BITS_S);
        }
        else
        {
            return (16);
        }
    }
    else
    {
        return (8);
    }
}