Alarm Sensor Module  0.1
⇒ back to Project Page

◆ calculate_battery_voltage()

uint32_t calculate_battery_voltage ( uint32_t  adc_voltage_u32)

Calculates the battery voltage, based on the adc voltage value and the resistor values of the voltage divider. The resistor values are specified in the corresponding header file subfunctions.h

Parameters
[in]adc_voltage_u32ADC voltage, delivered by the function single_adc_read()
Returns
battery voltage [mV]
Date
  • Created 20.01.2019
  • Modified 20.01.2019
Author
Michael Skutek, micha.nosp@m.el@s.nosp@m.kutek.nosp@m..de

Definition at line 58 of file subfunctions.c.

Referenced by main().

Here is the caller graph for this function: