enable battery monitoring on HeltecV2
This commit is contained in:
1 parent
e7370e1d3c
commit
a2f94ee0bd
3 files changed
+17
-8
No files matched your search
+6
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user