enable battery monitoring on HeltecV2

This commit is contained in:
cyberman54 committed 2021-02-13 15:58:56 +01:00
1 parent e7370e1d3c
commit a2f94ee0bd
3 files changed
+17 -8

No files matched your search

+6 -1
View File
@@ -2,8 +2,8 @@
#define _POWER_H
#include <Arduino.h>
#include <driver/adc.h>
#include <esp_adc_cal.h>
//#include <esp32-hal-adc.h>
#include "i2c.h"
#include "reset.h"
@@ -43,6 +43,11 @@
#endif
#endif
#ifdef BAT_MEASURE_ADC_UNIT // ADC2 wifi bug workaround
extern RTC_NOINIT_ATTR uint64_t RTC_reg_b;
#include "soc/sens_reg.h" // needed for adc pin reset
#endif
typedef uint8_t (*mapFn_t)(uint16_t, uint16_t, uint16_t);
uint16_t read_voltage(void);