retrieving/storing amount on eeprom esp8266

This commit is contained in:
Florian Hoss 2022-04-24 13:25:55 +02:00
parent 85c41b6530
commit b356054121
2 changed files with 37 additions and 6 deletions

View file

@ -4,6 +4,9 @@
#ifdef ESP32
#include "Preferences.h"
#include "SPIFFS.h"
#elif defined(ESP8266)
#include "EEPROM.h"
#include "spiffs_api.h"
#endif
#include "Utils.hpp"
@ -15,8 +18,14 @@ namespace fw
private:
#ifdef ESP32
Preferences memory;
#elif defined(ESP8266)
uint16_t eeprom_size = 1000;
uint8_t security_number = 93;
uint16_t eeprom_settings_head = 0;
uint16_t eeprom_rules_head = 10;
#endif
ok_t mount_spiffs();
ok_t setup_eeprom();
protected:
uint8_t retrieve_settings_value(const char *);