forked from Archive/PX4-Autopilot
Restore the correct handling of the ACK flag at read completion.
This commit is contained in:
parent
dc88dd0abb
commit
51c47769f8
|
@ -1225,11 +1225,11 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv)
|
|||
|
||||
/* Disable acknowledge when last byte is to be received */
|
||||
|
||||
priv->dcnt--;
|
||||
if (priv->dcnt == 1)
|
||||
{
|
||||
stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ACK, 0);
|
||||
}
|
||||
priv->dcnt--;
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
irqrestore(state);
|
||||
|
|
Loading…
Reference in New Issue