/* 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->CFGR;
  tmpreg1 &= ~(uint32_t)(ADC_CFGR_DISCNUM);
  tmpreg2 = Number - 1;
  tmpreg1 |= tmpreg2 << 17;
  ADCx->CFGR = tmpreg1;
}