/* Configures the discontinuous mode for the selected ADC regular group channel.  */
void ADC_ConfigDiscModeChannelCount(ADC_Module *ADCx, uint8_t Number)
/* Configures the discontinuous mode for the selected ADC regular group channel.  */
void ADC_ConfigDiscModeChannelCount(ADC_Module *ADCx, uint8_t Number)
{
    uint32_t tmpreg1 = 0;
    uint32_t tmpreg2 = 0;
    assert_param(IsAdcModule(ADCx));
    assert_param(IsAdcSeqDiscNumberValid(Number));
    tmpreg1 = ADCx->CTRL1;
    tmpreg1 &= CR1_DISCNUM_Reset;
    tmpreg2 = Number - 1;
    tmpreg1 |= tmpreg2 << 13;
    ADCx->CTRL1 = tmpreg1;
}