/* ADC Set conversion operation mode. 
There are some operation modes, common for entire stm32 branch. In the text the braces are describing result to single trigger event. The trigger event is described by character T in the description. The ADC is configured to convert list of inputs . In Grouped modes, there is used group size of 2 conversions in the examples */
void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode)
/* ADC Set conversion operation mode. 
There are some operation modes, common for entire stm32 branch. In the text the braces are describing result to single trigger event. The trigger event is described by character T in the description. The ADC is configured to convert list of inputs . In Grouped modes, there is used group size of 2 conversions in the examples */
void adc_set_operation_mode(uint32_t adc, enum adc_opmode opmode)
{
	switch (opmode) {
	case ADC_MODE_SEQUENTIAL:
		ADC_CFGR1(adc) &= ~ADC_CFGR1_CONT;
		ADC_CFGR1(adc) |= ADC_CFGR1_DISCEN;
		break;
	case ADC_MODE_SCAN:
		ADC_CFGR1(adc) &= ~(ADC_CFGR1_CONT | ADC_CFGR1_DISCEN);
		break;
	case ADC_MODE_SCAN_INFINITE:
		ADC_CFGR1(adc) &= ~ADC_CFGR1_DISCEN;
		ADC_CFGR1(adc) |= ADC_CFGR1_CONT;
		break;
	}
}