STM32 I2C: More backward tests of CONFIG_I2C_POLLED. Needs to be reviewed.

This commit is contained in:
Gregory Nutt 2017-05-03 17:33:35 -06:00
parent 36c7ba83e1
commit 1e054a2d3b
5 changed files with 10 additions and 10 deletions

View File

@ -1272,7 +1272,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
* device. * device.
*/ */
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
irqstate_t flags = enter_critical_section(); irqstate_t flags = enter_critical_section();
#endif #endif
/* Receive a byte */ /* Receive a byte */
@ -1287,7 +1287,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ACK, 0); stm32_i2c_modifyreg(priv, STM32_I2C_CR1_OFFSET, I2C_CR1_ACK, 0);
} }
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
leave_critical_section(flags); leave_critical_section(flags);
#endif #endif
} }

View File

@ -1332,7 +1332,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
* device. * device.
*/ */
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
irqstate_t flags = enter_critical_section(); irqstate_t flags = enter_critical_section();
#endif #endif
/* Receive a byte */ /* Receive a byte */
@ -1347,7 +1347,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
/* autoend? */ /* autoend? */
} }
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
leave_critical_section(flags); leave_critical_section(flags);
#endif #endif
} }

View File

@ -1306,7 +1306,7 @@ static int stm32f0_i2c_isr_process(struct stm32f0_i2c_priv_s *priv)
* device. * device.
*/ */
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
irqstate_t flags = enter_critical_section(); irqstate_t flags = enter_critical_section();
#endif #endif
/* Receive a byte */ /* Receive a byte */
@ -1321,7 +1321,7 @@ static int stm32f0_i2c_isr_process(struct stm32f0_i2c_priv_s *priv)
/* autoend? */ /* autoend? */
} }
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
leave_critical_section(flags); leave_critical_section(flags);
#endif #endif
} }

View File

@ -1776,7 +1776,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
* sequence. Otherwise, additional bytes may be received. * sequence. Otherwise, additional bytes may be received.
*/ */
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
irqstate_t state = enter_critical_section(); irqstate_t state = enter_critical_section();
#endif #endif
/* Receive a byte */ /* Receive a byte */
@ -1793,7 +1793,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
priv->dcnt--; priv->dcnt--;
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
leave_critical_section(state); leave_critical_section(state);
#endif #endif
} }

View File

@ -1384,7 +1384,7 @@ static int stm32l4_i2c_isr_process(struct stm32l4_i2c_priv_s *priv)
* device. * device.
*/ */
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
irqstate_t flags = enter_critical_section(); irqstate_t flags = enter_critical_section();
#endif #endif
/* Receive a byte */ /* Receive a byte */
@ -1399,7 +1399,7 @@ static int stm32l4_i2c_isr_process(struct stm32l4_i2c_priv_s *priv)
/* autoend? */ /* autoend? */
} }
#ifdef CONFIG_I2C_POLLED #ifndef CONFIG_I2C_POLLED
leave_critical_section(flags); leave_critical_section(flags);
#endif #endif
} }