/* ADC Oversampling mode configuration. This function configures ADC as Oversampling mode with below Settings. 
GLCK for ADC -> GCLK_GENERATOR_1 (8MHz) CLK_ADC -> 512 KHz REFERENCE -> 1/2 VDDANA (1.65V) RESOLUTION -> 16 bit POSITIVE INPUT -> PA02 NEGATIVE INPUT -> GND  */
void configure_adc_sampling(void)
/* ADC Oversampling mode configuration. This function configures ADC as Oversampling mode with below Settings. 
GLCK for ADC -> GCLK_GENERATOR_1 (8MHz) CLK_ADC -> 512 KHz REFERENCE -> 1/2 VDDANA (1.65V) RESOLUTION -> 16 bit POSITIVE INPUT -> PA02 NEGATIVE INPUT -> GND  */
void configure_adc_sampling(void)
{
	struct adc_config conf_adc;
	adc_get_config_defaults(&conf_adc);
	conf_adc.clock_source = GCLK_GENERATOR_1;
	conf_adc.reference = ADC_REFERENCE_INTVCC1;
	conf_adc.clock_prescaler = ADC_CLOCK_PRESCALER_DIV16;
	conf_adc.positive_input = ADC_POSITIVE_INPUT_PIN0;
	conf_adc.negative_input = ADC_NEGATIVE_INPUT_GND;
	conf_adc.resolution	= ADC_RESOLUTION_16BIT;
	conf_adc.reference_compensation_enable = true;
	adc_init(&adc_instance, ADC, &conf_adc);
	adc_enable(&adc_instance);
}