mirror of
https://github.com/apache/nuttx.git
synced 2026-10-13 01:00:12 +00:00
esp32c3:fix i2c bug of timout
Signed-off-by: flyingfish89 <2914061332@qq.com>
This commit is contained in:
parent
30a01ab551
commit
f420b4dce7
1 changed files with 1 additions and 1 deletions
|
|
@ -844,7 +844,7 @@ static int esp32c3_i2c_polling_waitdone(struct esp32c3_i2c_priv_s *priv)
|
|||
* and an error didn't occur within the timeout
|
||||
*/
|
||||
|
||||
while ((current < timeout) && (priv->error == 0))
|
||||
while ((sclock_t)(current - timeout) < 0 && (priv->error == 0))
|
||||
{
|
||||
/* Check if any interrupt triggered, clear them
|
||||
* process the operation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue