ESP32 support added

* ESP32 adjustments, compiles and runs
* Changed gitignore to ignore debug log files
This commit is contained in:
tastendruecker123 2022-08-19 17:35:10 +02:00 committed by GitHub
parent 9ca1792480
commit 0ad53d56d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 153 additions and 50 deletions

View file

@ -8,11 +8,23 @@
#include "Arduino.h"
#include <EEPROM.h>
#ifdef ESP32
#include <nvs_flash.h>
#endif
class eep {
public:
eep() {
EEPROM.begin(4096);
#ifdef ESP32
if(!EEPROM.begin(4096)) {
nvs_flash_init();
EEPROM.begin(4096);
}
#else
EEPROM.begin(4096);
#endif
}
~eep() {
EEPROM.end();