/* ADC Window Monitoring mode configuration. This function configures ADC as Window Monitoring 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 -> GND Threshold low level -> 0.75V Monitor mode -> Above lower threshold  */
void configure_adc_window_monitor(void)
/* ADC Window Monitoring mode configuration. This function configures ADC as Window Monitoring 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 -> GND Threshold low level -> 0.75V Monitor mode -> Above lower threshold  */
void configure_adc_window_monitor(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.window.window_mode = ADC_WINDOW_MODE_ABOVE_LOWER;
	conf_adc.window.window_lower_value = ADC_WINDOW_LOWER_THERSOLD_VALUE;
	adc_init(&adc_instance, ADC, &conf_adc);
	adc_enable(&adc_instance);
}