#include"common.h"
#include "drv_adc.h"
#include "measure_vol.h"

 

uint32_t Measure_Vol(void)
{
	unsigned short adc_temp = 0;
	uint32_t Batter_Vol = 0xFFFFFFFF;
	
	// get adc value
	if(adc_getResult_6t(adc_vbat, &adc_temp) != 1)
	{
		goto error;
	}
	
	//
	Batter_Vol = adc_temp*3300UL*101/4095;
	
error:	
	
	return Batter_Vol;
}

void Measure_Vol_Initial(void)
{
	
	_Measure_Vol_Initial();
	
	//

}





