mirror of
https://github.com/okalachev/flix.git
synced 2026-01-11 05:26:53 +00:00
Adapt firmware for non-esp32 boards
This commit is contained in:
@@ -6,8 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifdef ESP32
|
||||||
#include <soc/soc.h>
|
#include <soc/soc.h>
|
||||||
#include <soc/rtc_cntl_reg.h>
|
#include <soc/rtc_cntl_reg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
const float ONE_G = 9.80665;
|
const float ONE_G = 9.80665;
|
||||||
extern float t;
|
extern float t;
|
||||||
@@ -37,7 +39,9 @@ float wrapAngle(float angle) {
|
|||||||
|
|
||||||
// Disable reset on low voltage
|
// Disable reset on low voltage
|
||||||
void disableBrownOut() {
|
void disableBrownOut() {
|
||||||
|
#ifdef ESP32
|
||||||
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA);
|
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ENA);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trim and split string by spaces
|
// Trim and split string by spaces
|
||||||
|
|||||||
Reference in New Issue
Block a user