git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13285 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2020-01-18 10:52:36 +00:00
parent 325a466945
commit 4e1ee919d4
2 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,8 @@ static inline msg_t i2c_check_arbitration(I2CDriver *i2cp) {
static inline msg_t i2c_check_timeout(I2CDriver *i2cp) {
if (!osalTimeIsInRangeX(osalOsGetSystemTimeX(), i2cp->start, i2cp->end)) {
if ((i2cp->start != i2cp->end) &&
(!osalTimeIsInRangeX(osalOsGetSystemTimeX(), i2cp->start, i2cp->end))) {
i2c_write_stop(i2cp);
return MSG_TIMEOUT;
}
@ -105,7 +106,8 @@ static inline msg_t i2c_check_timeout(I2CDriver *i2cp) {
static msg_t i2c_wait_clock(I2CDriver *i2cp) {
while (palReadLine(i2cp->config->scl) == PAL_LOW) {
if (!osalTimeIsInRangeX(osalOsGetSystemTimeX(), i2cp->start, i2cp->end)) {
if ((i2cp->start != i2cp->end) &&
(!osalTimeIsInRangeX(osalOsGetSystemTimeX(), i2cp->start, i2cp->end))) {
return MSG_TIMEOUT;
}
i2c_delay(i2cp);

View File

@ -154,6 +154,8 @@
- HAL: Added a new interface for range-finder devices (used by EX).
- HAL: Added mcuconf.h updater tool for STM32F407 (backported to 19.1.1).
- NIL: Integrated NIL 4.0.
- FIX: Fixed problem in the I2C fallback driver (bug #1069)
(backported to 19.1.4)(backported to 18.2.3).
- FIX: Fixed TIM8 missing on STM32H7xx (bug #1068)
(backported to 19.1.4)(backported to 18.2.3).
- FIX: Fixed Sharing issues with GPT TIMv1 driver (bug #1067)