i2c的SCL时序控制,可能存在SCL上升缓慢地情况,需要添加延时等待

This commit is contained in:
2023-08-01 16:48:42 +08:00
parent 851d6436a7
commit ba913a7eaf

View File

@ -50,6 +50,7 @@ static rt_err_t SCL_H(struct rt_i2c_bit_ops *ops)
goto done;
start = rt_tick_get();
i2c_delay(ops);
while (!GET_SCL(ops))
{
if ((rt_tick_get() - start) > ops->timeout)