60 uint32_t tmp_value_u32;
62 tmp_value_u32 = (uint32_t) (adc_voltage_u32 * (uint32_t)
R_SUM);
64 return (uint32_t) tmp_value_u32 / (uint32_t)
R2_VALUE;
#define R_SUM
sum of both resistors
uint32_t calculate_battery_voltage(uint32_t adc_voltage_u32)
#define R2_VALUE
Value of resistor R2, connected to the ground [Ohm].