mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-31 17:56:11 +02:00
ESP32 support added
* ESP32 adjustments, compiles and runs * Changed gitignore to ignore debug log files
This commit is contained in:
parent
9ca1792480
commit
0ad53d56d8
13 changed files with 153 additions and 50 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue