/* ADC START and Read Result. 
This function starts the ADC and wait for the ADC conversation to be complete and read the ADC result register and return the same to calling function.  */
uint16_t adc_start_read_result(void)
/* ADC START and Read Result. 
This function starts the ADC and wait for the ADC conversation to be complete and read the ADC result register and return the same to calling function.  */
uint16_t adc_start_read_result(void)
{
	uint16_t adc_result = 0;
	adc_start_conversion(&adc_instance);
	while((adc_get_status(&adc_instance) & ADC_STATUS_RESULT_READY) != 1);
	adc_read(&adc_instance, &adc_result);
	return adc_result;
}