stm32_common: i2c_2: fix for -Wunused-function
This came up when compiling an application for a STM32-based board with LLVM/clang. The function is not used if I²C is not provided.
This commit is contained in:
parent
2f480efb60
commit
6f78a7f331
@ -507,6 +507,7 @@ static inline int _wait_ready(I2C_TypeDef *i2c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if I2C_0_ISR || I2C_1_ISR
|
||||
static inline void irq_handler(i2c_t dev)
|
||||
{
|
||||
assert(dev < I2C_NUMOF);
|
||||
@ -541,6 +542,7 @@ static inline void irq_handler(i2c_t dev)
|
||||
}
|
||||
core_panic(PANIC_GENERAL_ERROR, "I2C FAULT");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if I2C_0_ISR
|
||||
void I2C_0_ISR(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user