/* I2C Set Bus Clock Frequency. 
Set the bus clock frequency. This is a 12 bit number (0...4095) calculated from the formulae given in the STM32F1 reference manual in the description of the CCR field. It is a divisor of the peripheral clock frequency  */
void i2c_set_ccr(uint32_t i2c, uint16_t freq)
/* I2C Set Bus Clock Frequency. 
Set the bus clock frequency. This is a 12 bit number (0...4095) calculated from the formulae given in the STM32F1 reference manual in the description of the CCR field. It is a divisor of the peripheral clock frequency  */
void i2c_set_ccr(uint32_t i2c, uint16_t freq)
{
	uint16_t reg16;
	reg16 = I2C_CCR(i2c) & 0xf000;
	reg16 |= freq;
	I2C_CCR(i2c) = reg16;
}