mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 06:36:45 +08:00
Restore the correct handling of the ACK flag at read completion.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user