retrieving/storing amount on eeprom esp8266
This commit is contained in:
parent
85c41b6530
commit
b356054121
2 changed files with 37 additions and 6 deletions
|
@ -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 *);
|
||||
|
|
Reference in a new issue