/* Enables or disables the I2C own address 2.  */
void I2C_DualAddressCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
/* Enables or disables the I2C own address 2.  */
void I2C_DualAddressCmd(I2C_TypeDef *I2Cx, FunctionalState NewState)
{
    assert_param(IS_I2C_ALL_PERIPH(I2Cx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        I2Cx->OAR2 |= I2C_OAR2_OA2EN;
    }
    else
    {
        I2Cx->OAR2 &= (uint32_t)~((uint32_t)I2C_OAR2_OA2EN);
    }
}