/* Callback function for AFEC enter compasion window interrupt.  */
static void afec_print_comp_result(void)
/* Callback function for AFEC enter compasion window interrupt.  */
static void afec_print_comp_result(void)
{
	uint16_t us_adc;
	afec_disable_interrupt(AFEC0, AFEC_INTERRUPT_COMP_ERROR);
	us_adc = afec_channel_get_value(AFEC0, AFEC_CHANNEL_POTENTIOMETER);
	printf("-ISR-:Potentiometer voltage %d mv is in the comparison "
			"window:%d -%d mv!\n\r",
			(int)(us_adc * VOLT_REF / MAX_DIGITAL),
			(int)(gs_us_low_threshold * VOLT_REF / MAX_DIGITAL),
			(int)(gs_us_high_threshold * VOLT_REF / MAX_DIGITAL));
}