mirror of
https://github.com/okalachev/flix.git
synced 2026-08-15 16:29:00 +00:00
Fix
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
|
||||
// Power management
|
||||
|
||||
#ifdef ESP32
|
||||
#include <soc/soc.h>
|
||||
#include <soc/rtc_cntl_reg.h>
|
||||
#endif
|
||||
#include "lpf.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -14,7 +16,9 @@ int voltagePin = -1;
|
||||
float voltageScale = 2;
|
||||
|
||||
void setupPower() {
|
||||
#ifdef ESP32
|
||||
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA); // disable reset on low voltage
|
||||
#endif
|
||||
if (digitalPinToAnalogChannel(voltagePin) == -1) voltagePin = -1; // test ADC pin
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user