/* ADC Set the Sample Time for All Channels. 
Setup all ADC channels to use a single ADC sampling time. */
void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
/* ADC Set the Sample Time for All Channels. 
Setup all ADC channels to use a single ADC sampling time. */
void adc_set_sample_time_on_all_channels(uint32_t adc, uint8_t time)
{
	uint32_t reg32;
	reg32 = ADC_SMPR1(adc);
	reg32 &= ~((ADC_SMPR_SMPSEL_MASK << ADC_SMPR_SMPSEL_SHIFT) | (ADC_SMPR_SMP1_MASK << ADC_SMPR_SMP1_SHIFT));
	reg32 |= (time << ADC_SMPR_SMP1_SHIFT);
	ADC_SMPR1(adc) = reg32;
}