bootoptions: use NVRAM instead of wearing out flash for crash detection in esp32

This commit is contained in:
2023-02-19 18:40:16 +01:00
parent ae3abc3aa3
commit 160cbc5ea9
2 changed files with 27 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
#pragma once
#include <Arduino.h>
struct BootOptions {
static void initPins();
@@ -12,4 +13,6 @@ struct BootOptions {
bool isFlash = false;
bool lastBootWasFlash = false;
bool isSafeMode = false;
uint8_t crashCount = 0;
uint8_t resetReason = 0;
};