aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/I2Cv1
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-08 18:42:15 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-08 18:42:15 +0000
commit1e5db5c3aca5f3908415d61dfdcb9763adaa554d (patch)
tree53002261ee444c0c7b9a4bf13342c5fb02f549fe /os/hal/platforms/STM32/I2Cv1
parent418bd8f702af43d19173c2f42611c2472081d09e (diff)
downloadChibiOS-1e5db5c3aca5f3908415d61dfdcb9763adaa554d.tar.gz
ChibiOS-1e5db5c3aca5f3908415d61dfdcb9763adaa554d.tar.bz2
ChibiOS-1e5db5c3aca5f3908415d61dfdcb9763adaa554d.zip
I2C. Removed unneded return.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4545 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/I2Cv1')
-rw-r--r--os/hal/platforms/STM32/I2Cv1/i2c_lld.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/os/hal/platforms/STM32/I2Cv1/i2c_lld.c b/os/hal/platforms/STM32/I2Cv1/i2c_lld.c
index 08c7ee40b..5c18db706 100644
--- a/os/hal/platforms/STM32/I2Cv1/i2c_lld.c
+++ b/os/hal/platforms/STM32/I2Cv1/i2c_lld.c
@@ -281,11 +281,9 @@ static void i2c_lld_set_opmode(I2CDriver *i2cp) {
*
* @param[in] i2cp pointer to the @p I2CDriver object
*
- * @return Useless value to protect last instruction from
- * optimization out.
* @notapi
*/
-static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) {
+static void i2c_lld_serve_event_interrupt(I2CDriver *i2cp) {
I2C_TypeDef *dp = i2cp->i2c;
uint32_t regSR2 = dp->SR2;
uint32_t event = dp->SR1;
@@ -314,7 +312,7 @@ static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) {
/* Starts "read after write" operation, LSB = 1 -> receive.*/
i2cp->addr |= 0x01;
dp->CR1 |= I2C_CR1_START | I2C_CR1_ACK;
- return regSR2;
+ return;
}
dp->CR2 &= ~I2C_CR2_ITEVTEN;
dp->CR1 |= I2C_CR1_STOP;
@@ -325,8 +323,7 @@ static uint32_t i2c_lld_serve_event_interrupt(I2CDriver *i2cp) {
}
/* Clear ADDR flag. */
if (event & (I2C_SR1_ADDR | I2C_SR1_ADD10))
- regSR2 = dp->SR2;
- return regSR2;
+ (void)dp->SR2;
}
/**