MAXREFDES70# Code Documentation  V02.00
High-precision long battery life heat/flow meter
 All Data Structures Files Functions Variables Enumerator Macros Pages
batteryLevel.c File Reference
#include "batteryLevel.h"
#include "em_chip.h"
#include "em_device.h"
#include "em_cmu.h"
#include "em_system.h"
#include "em_vcmp.h"

Go to the source code of this file.

Functions

void WaitForComparatorUpdate ()
 Wait for comparator propagation delay.
 
int batteryLevel (void)
 Check battery voltage (connected to EFM32 VDDIO).
 

Function Documentation

int batteryLevel ( void  )

Check battery voltage (connected to EFM32 VDDIO).

Continuously compare battery voltage against a VCMP trigger level, if VCMPOUT is negative, use that level as battery voltage.

Definition at line 76 of file batteryLevel.c.

void WaitForComparatorUpdate ( )

Wait for comparator propagation delay.

Definition at line 58 of file batteryLevel.c.