Back out PX4 fixes that were reverted in PX4 repository
This commit is contained in:
parent
29d74a522b
commit
ecd768a9e2
|
@ -7375,3 +7375,5 @@
|
|||
From Hannes Delago (2014-5-25).
|
||||
* include/nuttx/mtd/mtd.h: Needs forward reference to struct spi_dev_s.
|
||||
(2014-5-25).
|
||||
* arch/arm/src/stm32/stm32_i2c.c and stm32_i2c_alt.c: Back out PX4 fixes
|
||||
that were reverted in the PX4 repositories (2014-5-25).
|
||||
|
|
|
@ -1632,14 +1632,7 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
|||
|
||||
stm32_i2c_clrstart(priv);
|
||||
|
||||
/* Old transfers are done
|
||||
*
|
||||
* Reset ptr and dcnt to ensure an unexpected data interrupt doesn't
|
||||
* overwrite stale data.
|
||||
*/
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
/* Old transfers are done */
|
||||
|
||||
priv->msgv = msgs;
|
||||
priv->msgc = count;
|
||||
|
@ -1776,11 +1769,6 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
|||
stm32_i2c_enablefsmc(ahbenr);
|
||||
stm32_i2c_sem_post(dev);
|
||||
|
||||
/* Ensure that any ISR happening after we finish can't overwrite any user data */
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
|
|
@ -2134,14 +2134,7 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
|||
|
||||
stm32_i2c_clrstart(priv);
|
||||
|
||||
/* Old transfers are done
|
||||
*
|
||||
* Reset ptr and dcnt to ensure an unexpected data interrupt doesn't
|
||||
* overwrite stale data.
|
||||
*/
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
/* Old transfers are done */
|
||||
|
||||
priv->msgv = msgs;
|
||||
priv->msgc = count;
|
||||
|
@ -2304,11 +2297,6 @@ static int stm32_i2c_process(FAR struct i2c_dev_s *dev, FAR struct i2c_msg_s *ms
|
|||
stm32_i2c_enablefsmc(ahbenr);
|
||||
stm32_i2c_sem_post(dev);
|
||||
|
||||
/* Ensure that any ISR happening after we finish can't overwrite any user data */
|
||||
|
||||
priv->dcnt = 0;
|
||||
priv->ptr = NULL;
|
||||
|
||||
return -errval;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue