/* param handle i2c master handle. param i2CInstance instance number of the i2c bus, such as 0 is corresponding to I2C0. param i2cBaudrate i2c baudrate. param i2cSourceClockHz i2c source clock frequency. return kStatus_HAL_I2cSuccess is success, else initial failed.  */
status_t CODEC_I2C_Init(void *handle, uint32_t i2cInstance, uint32_t i2cBaudrate, uint32_t i2cSourceClockHz)
/* param handle i2c master handle. param i2CInstance instance number of the i2c bus, such as 0 is corresponding to I2C0. param i2cBaudrate i2c baudrate. param i2cSourceClockHz i2c source clock frequency. return kStatus_HAL_I2cSuccess is success, else initial failed.  */
status_t CODEC_I2C_Init(void *handle, uint32_t i2cInstance, uint32_t i2cBaudrate, uint32_t i2cSourceClockHz)
{
    hal_i2c_master_config_t masterConfig;
    masterConfig.enableMaster = true;
    masterConfig.baudRate_Bps = i2cBaudrate;
    masterConfig.srcClock_Hz  = i2cSourceClockHz;
    masterConfig.instance     = i2cInstance;
    return HAL_I2cMasterInit((hal_i2c_master_handle_t *)handle, &masterConfig);
}