未验证 提交 d1f77fc9 编写于 作者: z13955633063's avatar z13955633063 提交者: GitHub

clock bug

change to APB1
上级 50b633ed
...@@ -513,7 +513,7 @@ rt_err_t stm32_i2c_register(I2C_TypeDef *I2C, rt_uint32_t bitrate, ...@@ -513,7 +513,7 @@ rt_err_t stm32_i2c_register(I2C_TypeDef *I2C, rt_uint32_t bitrate,
if(I2C == I2C1) if(I2C == I2C1)
{ {
pi2c = &stm32_i2c1; pi2c = &stm32_i2c1;
RCC_APB2PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE);
} }
else else
#endif /*RT_USING_I2C1*/ #endif /*RT_USING_I2C1*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册