This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e902b59 i2c/bitbang: fix compile break when enable
CONFIG_I2C_BITBANG_NO_DELAY
e902b59 is described below
commit e902b59006fc1b4d1f9be22251332d83877632a9
Author: Jiuzhu Dong <[email protected]>
AuthorDate: Wed Oct 13 10:34:34 2021 +0800
i2c/bitbang: fix compile break when enable CONFIG_I2C_BITBANG_NO_DELAY
Signed-off-by: Jiuzhu Dong <[email protected]>
---
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 6beca58..89ef93a 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;
}