Core2 for AWS IoT EduKit BSP 1.5.1
Core2ForAWS_PMU_GetBatVolt
float Core2ForAWS_PMU_GetBatVolt(void)
Gets the battery voltage with the AXP192.
Definition: core2forAWS.c:160

Gets the battery voltage with the AXP192.

EXAMPLE Get the current battery voltage in the variable named battery_voltage and print the voltage to the serial output.

float battery_voltage = Core2ForAWS_PMU_GetBatVolt();
printf("Battery Voltage: %0.2f", battery_voltage);
Returns
The voltage of the battery.