mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
Revert "STM32 I2C: More backward tests of CONFIG_I2C_POLLED. Needs to be reviewed."
This reverts commit 1e054a2d3b.
This commit is contained in:
@@ -1272,7 +1272,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
|||||||
* device.
|
* device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef CONFIG_I2C_POLLED
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1332,7 +1332,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
|
|||||||
* device.
|
* device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef 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? */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef CONFIG_I2C_POLLED
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1306,7 +1306,7 @@ static int stm32f0_i2c_isr_process(struct stm32f0_i2c_priv_s *priv)
|
|||||||
* device.
|
* device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef 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? */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef CONFIG_I2C_POLLED
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef 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--;
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef CONFIG_I2C_POLLED
|
||||||
leave_critical_section(state);
|
leave_critical_section(state);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1384,7 +1384,7 @@ static int stm32l4_i2c_isr_process(struct stm32l4_i2c_priv_s *priv)
|
|||||||
* device.
|
* device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef 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? */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_I2C_POLLED
|
#ifdef CONFIG_I2C_POLLED
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user