STM32 I2C: More backward tests of CONFIG_I2C_POLLED. Needs to be reviewed.
This commit is contained in:
parent
36c7ba83e1
commit
1e054a2d3b
@ -1272,7 +1272,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||
* device.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irqstate_t flags = enter_critical_section();
|
||||
#endif
|
||||
/* 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);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
}
|
||||
|
@ -1332,7 +1332,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||
* device.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irqstate_t flags = enter_critical_section();
|
||||
#endif
|
||||
/* Receive a byte */
|
||||
@ -1347,7 +1347,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||
/* autoend? */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
}
|
||||
|
@ -1306,7 +1306,7 @@ static int stm32f0_i2c_isr_process(struct stm32f0_i2c_priv_s *priv)
|
||||
* device.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irqstate_t flags = enter_critical_section();
|
||||
#endif
|
||||
/* Receive a byte */
|
||||
@ -1321,7 +1321,7 @@ static int stm32f0_i2c_isr_process(struct stm32f0_i2c_priv_s *priv)
|
||||
/* autoend? */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
}
|
||||
|
@ -1776,7 +1776,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||
* sequence. Otherwise, additional bytes may be received.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irqstate_t state = enter_critical_section();
|
||||
#endif
|
||||
/* Receive a byte */
|
||||
@ -1793,7 +1793,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
||||
|
||||
priv->dcnt--;
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
leave_critical_section(state);
|
||||
#endif
|
||||
}
|
||||
|
@ -1384,7 +1384,7 @@ static int stm32l4_i2c_isr_process(struct stm32l4_i2c_priv_s *priv)
|
||||
* device.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
irqstate_t flags = enter_critical_section();
|
||||
#endif
|
||||
/* Receive a byte */
|
||||
@ -1399,7 +1399,7 @@ static int stm32l4_i2c_isr_process(struct stm32l4_i2c_priv_s *priv)
|
||||
/* autoend? */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_I2C_POLLED
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user