/* I2C Set Peripheral Clock Frequency. 
Set the peripheral clock frequency: 2MHz to 36MHz (the APB frequency). Note that this is  */
void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq)
/* I2C Set Peripheral Clock Frequency. 
Set the peripheral clock frequency: 2MHz to 36MHz (the APB frequency). Note that this is  */
void i2c_set_clock_frequency(uint32_t i2c, uint8_t freq)
{
	uint16_t reg16;
	reg16 = I2C_CR2(i2c) & 0xffc0;
	reg16 |= freq;
	I2C_CR2(i2c) = reg16;
}