2018-07-17 15:15:58 +02:00
|
|
|
#ifndef _BATTERY_H
|
|
|
|
#define _BATTERY_H
|
2018-07-15 14:28:05 +02:00
|
|
|
|
|
|
|
#include <driver/adc.h>
|
|
|
|
#include <esp_adc_cal.h>
|
|
|
|
|
|
|
|
#define DEFAULT_VREF 1100 // tbd: use adc2_vref_to_gpio() for better estimate
|
|
|
|
#define NO_OF_SAMPLES 64 // we do multisampling
|
|
|
|
|
|
|
|
uint16_t read_voltage(void);
|
|
|
|
|
|
|
|
#endif
|