📜  获取标志状态 c 代码 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:43.049000             🧑  作者: Mango

代码示例1
void I2C2_Write(uint8_t Data)
{
    LL_I2C_TransmitData8(I2C2, Data); // Transmit Data via I2C n.2
    while(!GetFlagStatus(LL_I2C_IsActiveFlag_BTF)); // Check for flag BTF
}


int GetFlagStatus(uint32_t (*fct)(I2C_TypeDef*))
{
    return ((*fct) (I2C2)); // Function called : LL_I2C_IsActiveFlag_BTF(I2C2)
}