/* Configures the discontinuous mode for the selected ADC regular group channel.  */
void ADC_DiscModeChannelCountConfig(ADC_TypeDef *ADCx, uint8_t Number)
/* Configures the discontinuous mode for the selected ADC regular group channel.  */
void ADC_DiscModeChannelCountConfig(ADC_TypeDef *ADCx, uint8_t Number)
{
  uint32_t tmpreg1 = 0;
  uint32_t tmpreg2 = 0;
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_REGULAR_DISC_NUMBER(Number));
  tmpreg1 = ADCx->CR1;
  tmpreg1 &= CR1_DISCNUM_RESET;
  tmpreg2 = Number - 1;
  tmpreg1 |= tmpreg2 << 13;
  ADCx->CR1 = tmpreg1;
}