i2c/bitbang: fix compile break when enable CONFIG_I2C_BITBANG_NO_DELAY

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-10-13 10:34:34 +08:00 committed by Xiang Xiao
parent 1e25602678
commit e902b59006
1 changed files with 2 additions and 0 deletions

View File

@ -269,6 +269,7 @@ static int i2c_bitbang_wait_ack(FAR struct i2c_bitbang_dev_s *priv)
{ {
ret = -EIO; ret = -EIO;
} }
#ifndef CONFIG_I2C_BITBANG_NO_DELAY
else else
{ {
int remaining = priv->delay - i; int remaining = priv->delay - i;
@ -278,6 +279,7 @@ static int i2c_bitbang_wait_ack(FAR struct i2c_bitbang_dev_s *priv)
up_udelay(remaining); up_udelay(remaining);
} }
} }
#endif
return ret; return ret;
} }