From e902b59006fc1b4d1f9be22251332d83877632a9 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Wed, 13 Oct 2021 10:34:34 +0800 Subject: [PATCH] i2c/bitbang: fix compile break when enable CONFIG_I2C_BITBANG_NO_DELAY Signed-off-by: Jiuzhu Dong --- drivers/i2c/i2c_bitbang.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c_bitbang.c b/drivers/i2c/i2c_bitbang.c index 6beca58683..89ef93a0f3 100644 --- a/drivers/i2c/i2c_bitbang.c +++ b/drivers/i2c/i2c_bitbang.c @@ -269,6 +269,7 @@ static int i2c_bitbang_wait_ack(FAR struct i2c_bitbang_dev_s *priv) { ret = -EIO; } +#ifndef CONFIG_I2C_BITBANG_NO_DELAY else { 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); } } +#endif return ret; }