/* Test on I2C1 EV6 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) /* EV6 */
{
}
/* Send the configuration register data pointer */
I2C_SendData(I2C1, Reg_Addr);
/* Test on I2C1 EV8 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
{
}
/* Send I2C1 data */
I2C_SendData(I2C1, RegValue);
/* Test on I2C1 EV8 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
{
}
/* Test on I2C1 EV5 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)) /* EV5 */
{
}
//===========================
/* Send c3088 read address for write */
I2C_Send7bitAddress(I2C1, C3088_Addr, I2C_Direction_Transmitter);
//===========================
/* Test on I2C1 EV6 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)) /* EV6 */
{
}
/* Send the configuration register data pointer */
I2C_SendData(I2C1, Reg_Addr);
/* Test on I2C1 EV8 and clear it */
while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_BYTE_TRANSMITTED)) /* EV8 */
{
}