diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-14 10:26:05 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-14 10:26:05 +0200 |
commit | a8fcd4a49c6306a56cd8df2b015a1e16be70852f (patch) | |
tree | d3201a00bba4acbde6afaf662a3e50e0659fa902 /nuttx/arch/arm/src/stm32/stm32_i2c.c | |
parent | 3a18a79bd5661307eb4c32834e2daf84ccf02a07 (diff) | |
parent | adad44a3a99dae529cc979bd4deb68bba8e9c61c (diff) | |
download | px4-firmware-a8fcd4a49c6306a56cd8df2b015a1e16be70852f.tar.gz px4-firmware-a8fcd4a49c6306a56cd8df2b015a1e16be70852f.tar.bz2 px4-firmware-a8fcd4a49c6306a56cd8df2b015a1e16be70852f.zip |
Merge branch 'master' of github.com:PX4/Firmware
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_i2c.c')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_i2c.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c index cca7a24aa..2d1a7142c 100644 --- a/nuttx/arch/arm/src/stm32/stm32_i2c.c +++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c @@ -1198,6 +1198,10 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) { stm32_i2c_traceevent(priv, I2CEVENT_RCVBYTE, priv->dcnt); +#ifdef CONFIG_I2C_POLLED + //irqstate_t state = irqsave(); +#endif + /* Receive a byte */ *priv->ptr++ = stm32_i2c_getreg(priv, STM32_I2C_DR_OFFSET); @@ -1209,6 +1213,11 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ACK, 0); } priv->dcnt--; + +#ifdef CONFIG_I2C_POLLED + //irqrestore(state); +#endif + } } |