/* Selects the source of the master clock, internal or external. */
void I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock)
/* Selects the source of the master clock, internal or external. */
void I2SMasterClockSelect(unsigned long ulBase, unsigned long ulMClock)
{
    unsigned long ulConfig;
    ASSERT(ulBase == I2S0_BASE);
    ASSERT((ulMClock & (I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT)) == ulMClock);
    ulConfig = HWREG(ulBase + I2S_O_CFG) &
                   ~(I2S_TX_MCLK_EXT | I2S_RX_MCLK_EXT);
    HWREG(ulBase + I2S_O_CFG) = ulConfig | ulMClock;
}