STM32H7 and STM32L4: Applied David Sidrane's I2C to:

arch/arm/src/stm32h7/stm32_i2c.c
   arch/arm/src/stm32l4/stm32l4_i2c.c

Those easy because F7 patch applied with no problem (after changing path and file names appropriately).  The patch could not be appleed to the following.  The logic is different.  I don't know if a similar change is needed there or not.

   arch/arm/src/stm32/stm32f30xxx_i2c.c
   arch/arm/src/stm32/stm32f40xxx_i2c.c
   arch/arm/src/stm32/stm32_i2c.c
   arch/arm/src/stm32/stm32_i2c_alt.c
   arch/arm/src/stm32f0/stm32f0_i2c.c
This commit is contained in:
Gregory Nutt 2018-12-05 15:38:42 -06:00
parent f43451b7df
commit dcf4b4b689
2 changed files with 6 additions and 2 deletions

View File

@ -1423,7 +1423,9 @@ static inline void stm32_i2c_sendstart(FAR struct stm32_i2c_priv_s *priv)
* it otherwise.
*/
if (priv->msgc > 0)
/* Check if there are multiple messages and the next is a continuation */
if (priv->msgc > 1)
{
next_norestart = (((priv->msgv + 1)->flags & I2C_M_NOSTART) != 0);
}

View File

@ -1593,7 +1593,9 @@ static inline void stm32l4_i2c_sendstart(FAR struct stm32l4_i2c_priv_s *priv)
* it otherwise.
*/
if (priv->msgc > 0)
/* Check if there are multiple messages and the next is a continuation */
if (priv->msgc > 1)
{
next_norestart = (((priv->msgv + 1)->flags & I2C_M_NOSTART) != 0);
}