mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-12 15:27:35 +08:00
Support for Raspberry PI RP2040 MCU (#18083)
This commit is contained in:
committed by
GitHub
parent
8f6fd5f37b
commit
ea1ae73526
@@ -225,7 +225,9 @@ I2C::transfer(const uint8_t *send, const unsigned send_len, uint8_t *recv, const
|
||||
|
||||
/* if we have already retried once, or we are going to give up, then reset the bus */
|
||||
if ((retry_count >= 1) || (retry_count >= _retries)) {
|
||||
#if defined(CONFIG_I2C_RESET)
|
||||
I2C_RESET(_dev);
|
||||
#endif // CONFIG_I2C_RESET
|
||||
}
|
||||
|
||||
} while (retry_count++ < _retries);
|
||||
|
||||
@@ -105,7 +105,9 @@ int detect(int bus)
|
||||
|
||||
// if we have already retried once, or we are going to give up, then reset the bus
|
||||
if ((retry_count >= 1) || (retry_count >= retries)) {
|
||||
#if defined(CONFIG_I2C_RESET)
|
||||
I2C_RESET(i2c_dev);
|
||||
#endif // CONFIG_I2C_RESET
|
||||
}
|
||||
|
||||
} while (retry_count++ < retries);
|
||||
|
||||
Reference in New Issue
Block a user