/* Clear the ISIF bit of the I2C interrupt flag */
I2C_Clear_INTERRUPT_Flag(I2Cx);
/* Wait for the stop to complete */
while (!I2C_Get_INTERRUPT_Flag(I2Cx));
// ;
/* Clear the ISIF bit of the I2C interrupt flag */
I2C_Clear_INTERRUPT_Flag(I2Cx);
/* Clear the I2C stop flag PIF bit */
I2C_Clear_Stop_Flag(I2Cx);
/* Turn off the I2C module */
I2C_Cmd(I2Cx, FALSE);
}