/* Configures the number of bytes to be transmitted/received.  */
void I2C_NumberOfBytesConfig(I2C_TypeDef *I2Cx, uint8_t Number_Bytes)
/* Configures the number of bytes to be transmitted/received.  */
void I2C_NumberOfBytesConfig(I2C_TypeDef *I2Cx, uint8_t Number_Bytes)
{
  uint32_t tmpreg = 0;
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  tmpreg = I2Cx->CR2;
  tmpreg &= (uint32_t)~((uint32_t)I2C_CR2_NBYTES);
  tmpreg |= (uint32_t)(((uint32_t)Number_Bytes << 16 ) & I2C_CR2_NBYTES);
  I2Cx->CR2 = tmpreg;
}