void I2C_ITConfig(I2C_TypeDef* I2Cx, uint16_t I2C_IT, FunctionalState NewState)
I2C_IT | 説明 |
I2C_IT_BUF | Buffer interrupt mask |
I2C_IT_EVT | Event interrupt mask |
I2C_IT_ERR | Error interrupt mask |
NewState | 説明 |
ENABLE | 有効にします |
DISABLE | 無効にします |
/* Enable I2C2 event and buffer interrupts */ I2C_ITConfig(I2C2, I2C_IT_BUF | I2C_IT_EVT, ENABLE);