/* Get the actual frequency of USCI_SPI bus clock. Only available in Master mode.  */
uint32_t USPI_GetBusClock(USPI_T *uspi)
/* Get the actual frequency of USCI_SPI bus clock. Only available in Master mode.  */
uint32_t USPI_GetBusClock(USPI_T *uspi)
{
    uint32_t u32BusClk;
    uint32_t u32ClkDiv;
    u32ClkDiv = (uspi->BRGEN & USPI_BRGEN_CLKDIV_Msk) >> USPI_BRGEN_CLKDIV_Pos;
    if(uspi == USPI0)
    {
        u32BusClk = (uint32_t)( CLK_GetPCLK0Freq() / ((u32ClkDiv+1ul)<<1) );
    }
    else
    {
        u32BusClk = (uint32_t)( CLK_GetPCLK1Freq() / ((u32ClkDiv+1ul)<<1) );
    }
    return u32BusClk;
}