Proposed code generation optimization
It would be best if functions intended to be used to check status from within interrupt handlers are optimal. STM32CubeMX generates many utility functions which check whether a single bit is equal to that bit. It would probably be more efficient to simply check that the bit is non-zero.
For example:
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx)
{
return (READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR));
}
would become:
__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx)
{
return (READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) != 0);
}