/* Enables or disables the specified I2C PEC transfer.  */
void I2C_TransmitPEC(I2C_TypeDef *I2Cx, FunctionalState NewState)
/* Enables or disables the specified I2C PEC transfer.  */
void I2C_TransmitPEC(I2C_TypeDef *I2Cx, FunctionalState NewState)
{
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    I2Cx->CR1 |= I2C_CR1_PEC;
  }
  else
  {
    I2Cx->CR1 &= (uint16_t)~((uint16_t)I2C_CR1_PEC);
  }
}