Skip to content

Commit

Permalink
stm32l1/i2c: Added preprocessor macros at the ISR's to check if the b…
Browse files Browse the repository at this point in the history
…us is enabled
  • Loading branch information
ReneHerthel committed Feb 10, 2016
1 parent 4a562f1 commit 8d5aebc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpu/stm32l1/periph/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ static inline void _stop(I2C_TypeDef *i2c)
i2c->CR1 |= I2C_CR1_STOP;
}

#if I2C_0_EN
void I2C_0_ERR_ISR(void)
{
unsigned state = I2C1->SR1;
Expand Down Expand Up @@ -441,7 +442,9 @@ void I2C_0_ERR_ISR(void)
}
while (1);
}
#endif /* I2C_0_EN */

#if I2C_1_EN
void I2C_1_ERR_ISR(void)
{
unsigned state = I2C2->SR1;
Expand Down Expand Up @@ -470,5 +473,6 @@ void I2C_1_ERR_ISR(void)
}
while (1);
}
#endif /* I2C_1_EN */

#endif /* I2C_NUMOF */

0 comments on commit 8d5aebc

Please sign in to comment.