/* ADC Enable an External Trigger for Regular Channels. 
For ADC1 and ADC2  */
void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger)
/* ADC Enable an External Trigger for Regular Channels. 
For ADC1 and ADC2  */
void adc_enable_external_trigger_regular(uint32_t adc, uint32_t trigger)
{
	uint32_t reg32;
	reg32 = (ADC_CR2(adc) & ~(ADC_CR2_EXTSEL_MASK));
	reg32 |= (trigger);
	ADC_CR2(adc) = reg32;
	ADC_CR2(adc) |= ADC_CR2_EXTTRIG;
}