#define FU_SAADC_RESOLUTION 1024 // 10bit
#define FU_SAADC_REFERENCE 3600 // (in the unit of mV)
uint16_t service_bas_voltage_get(void)
{
ret_code_t err_code;
uint16_t bat_mv;
nrf_saadc_value_t adc_value;
err_code = nrfx_saadc_sample_convert(FU_SAADC_CHANNEL_BATTERY, &adc_value);
APP_ERROR_CHECK(err_code);
bat_mv = adc_value*FU_SAADC_REFERENCE*2/FU_SAADC_RESOLUTION;
return bat_mv;
}