mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 18:52:46 +08:00
Made timeouts configurable, untested
This commit is contained in:
@@ -2013,7 +2013,7 @@ int up_i2creset(FAR struct i2c_dev_s * dev)
|
||||
|
||||
/* Give up if we have tried too hard */
|
||||
|
||||
if (clock_count++ > 1000)
|
||||
if (clock_count++ > CONFIG_STM32_I2CTIMEOTICKS)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -372,7 +372,8 @@ CONFIG_I2C_POLLED=y
|
||||
CONFIG_I2C_TRANSFER=y
|
||||
CONFIG_I2C_TRACE=n
|
||||
CONFIG_I2C_RESET=y
|
||||
|
||||
# XXX fixed per-transaction timeout
|
||||
CONFIG_STM32_I2CTIMEOMS=10
|
||||
|
||||
|
||||
# XXX re-enable after integration testing
|
||||
|
||||
Reference in New Issue
Block a user