/* Set the clock rate of the specified I2C port. 
The  */
void xI2CMasterInit(unsigned long ulBase, unsigned long ulI2CClk)
/* Set the clock rate of the specified I2C port. 
The  */
void xI2CMasterInit(unsigned long ulBase, unsigned long ulI2CClk)
{
    unsigned long ulHclk;
    unsigned long ulDiv;
    xASSERT((ulBase == I2C0_BASE));
    xSysCtlPeripheralReset(xSYSCTL_PERIPH_I2C0);
    ulHclk = xSysCtlClockGet();
    ulDiv = (unsigned long) (((ulHclk * 10)/(ulI2CClk * 4) + 5) / 10 - 1);
    xHWREG(ulBase + I2C_CLKDIV) = ulDiv;
    xHWREG(ulBase + I2C_CON) = 0;
    xHWREG(ulBase + I2C_CON) = I2C_CON_ENS1;
}