/* ADC Differential mode configuration. This function configures ADC as differential mode with below Settings. 
GLCK for ADC -> GCLK_GENERATOR_1 (8MHz) CLK_ADC -> 512 KHz REFERENCE -> 1/2 VDDANA (1.65V) POSITIVE INPUT -> PA02 NEGATIVE INPUT -> PA04  */
void configure_adc_differential(void)
/* ADC Differential mode configuration. This function configures ADC as differential mode with below Settings. 
GLCK for ADC -> GCLK_GENERATOR_1 (8MHz) CLK_ADC -> 512 KHz REFERENCE -> 1/2 VDDANA (1.65V) POSITIVE INPUT -> PA02 NEGATIVE INPUT -> PA04  */
void configure_adc_differential(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.differential_mode = true;
	conf_adc.positive_input = ADC_POSITIVE_INPUT_PIN0;
	conf_adc.negative_input = ADC_NEGATIVE_INPUT_PIN4;
	adc_init(&adc_instance, ADC, &conf_adc);
	adc_enable(&adc_instance);
}