Platform/ECM3532/DSP/hw/csp/ecm3532/src/eta_csp_i2c.c
/***************************************************************************/
/**
 *
 * EtaCspI2cInit - Initialize the I2C module.
 *
 * @param iClockSpeed is the I2C clock speed
 * @param iSrcClockSpeed is the source clock speed
 * @return Returns eEtaSuccess if initialization is successful.
 *
 ******************************************************************************/
Initialize the I2C module.
@param iClockSpeed is the I2C clock speed
@param iSrcClockSpeed is the source clock speed
@return Returns eEtaSuccess if initialization is successful.
Initialize the I2C module . @param iClockSpeed is the I2C clock speed @param iSrcClockSpeed is the source clock speed @return Returns eEtaSuccess if initialization is successful .
tEtaStatus
EtaCspI2cInit(tI2cClk iClockSpeed, tI2cSrcClk iSrcClockSpeed)
{
    tEtaStatus iResult;
    iResult = EtaCspI2cSpeedConfig(iClockSpeed, iSrcClockSpeed);
    if(iResult != eEtaSuccess)
    {
        return(iResult);
    }
    REG_I2C2_CONFIG = BM_SPI2_CONFIG2_STALL_IF_RXFULL |
                      BM_I2C2_CONFIG_HOLD_AT_ACK;
    REG_I2C2_CONFIG2 |=  BM_I2C2_CONFIG2_SOFT_RST;
    REG_I2C2_CONFIG2 &= ~BM_I2C2_CONFIG2_SOFT_RST;
     I2C setup.
    EtaCspI2cDonePoll();
    EtaCspI2cTxReadyPoll();
     Clear the Line from any aborted previous command.
    EtaCspI2cLineClear();
     Return the result.
    return(iResult);
}
tEtaStatus EtaCspI2cInit ( tI2cClk iClockSpeed , tI2cSrcClk iSrcClockSpeed ) { tEtaStatus iResult ; iResult = EtaCspI2cSpeedConfig ( iClockSpeed , iSrcClockSpeed ) ; if ( iResult != eEtaSuccess ) { return ( iResult ) ; } REG_I2C2_CONFIG = BM_SPI2_CONFIG2_STALL_IF_RXFULL | BM_I2C2_CONFIG_HOLD_AT_ACK ; REG_I2C2_CONFIG2 |= BM_I2C2_CONFIG2_SOFT_RST ; REG_I2C2_CONFIG2 &= ~ BM_I2C2_CONFIG2_SOFT_RST ; EtaCspI2cDonePoll ( ) ; EtaCspI2cTxReadyPoll ( ) ; EtaCspI2cLineClear ( ) ; return ( iResult ) ; }
EtaCspI2cInit - Initialize the I2C module.
EtaCspI2cInit - Initialize the I2C module .
// // I2C setup. // // // Clear the Line from any aborted previous command. // // // Return the result. //