arm/arm/src/stm32: Corrections to STM32 F4 I2C to fix the NORESTART flag.

This commit is contained in:
Alexander Oryshchenko 2018-02-13 11:41:57 -06:00 committed by Gregory Nutt
parent 643234dbcc
commit 9b812e3fa3

View File

@ -1315,7 +1315,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
* return the error to the waiting task.
*/
if (((priv->msgv[0].flags & I2C_M_NORESTART) != 0 && (status & I2C_SR1_BTF) == 0) ||
if (((priv->msgv[0].flags & I2C_M_NORESTART) != 0 && (status & I2C_SR1_TXE) == 0) ||
((priv->msgv[0].flags & I2C_M_NORESTART) == 0 && (status & I2C_SR1_SB) == 0))
{
#if defined(CONFIG_STM32_I2C_DMA) || defined(CONFIG_I2C_POLLED)