diff options
author | px4dev <px4@purgatory.org> | 2013-01-23 20:17:28 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-23 20:17:28 -0800 |
commit | 51c47769f8a3a451e1d54852280046472fb65757 (patch) | |
tree | d751272f03dd1c6f51b858d5885e5a04fdc61902 | |
parent | dc88dd0abb440b070e87337a7da6fd7a4c39311c (diff) | |
download | px4-firmware-51c47769f8a3a451e1d54852280046472fb65757.tar.gz px4-firmware-51c47769f8a3a451e1d54852280046472fb65757.tar.bz2 px4-firmware-51c47769f8a3a451e1d54852280046472fb65757.zip |
Restore the correct handling of the ACK flag at read completion.
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c index 80f157504..a66ac7e29 100644 --- a/nuttx/arch/arm/src/stm32/stm32_i2c.c +++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c @@ -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); |