提交 fa1f6c22 编写于 作者: J jaffer 提交者: mysterywolf

[fix]修复模拟i2c驱动延时bug

Signed-off-by: Njaffer <jaffer.work@foxmail.com>
上级 12ec87d6
......@@ -54,7 +54,7 @@ static rt_err_t SCL_H(struct rt_i2c_bit_ops *ops)
{
if ((rt_tick_get() - start) > ops->timeout)
return -RT_ETIMEOUT;
rt_thread_delay((ops->timeout + 1) >> 1);
i2c_delay(ops);
}
#ifdef RT_I2C_BITOPS_DEBUG
if (rt_tick_get() != start)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册