clock bug

change to APB1
This commit is contained in:
_--___ 2018-07-19 18:09:16 +08:00 committed by GitHub
parent 50b633ed1e
commit d1f77fc9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -513,7 +513,7 @@ rt_err_t stm32_i2c_register(I2C_TypeDef *I2C, rt_uint32_t bitrate,
if(I2C == I2C1)
{
pi2c = &stm32_i2c1;
RCC_APB2PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE);
}
else
#endif /*RT_USING_I2C1*/