40 lines
No EOL
528 B
C++
40 lines
No EOL
528 B
C++
#ifndef __eeprom_H__
|
|
#define __eeprom_H__
|
|
#include <TridentTD_ESP32NVS.h>
|
|
|
|
class eeprom
|
|
{
|
|
private:
|
|
|
|
public:
|
|
eeprom();
|
|
~eeprom();
|
|
void set_int(String name , uint64_t val );
|
|
uint64_t get_int(String name );
|
|
void begin();
|
|
};
|
|
|
|
eeprom::eeprom()
|
|
{
|
|
}
|
|
|
|
eeprom::~eeprom()
|
|
{
|
|
}
|
|
|
|
void eeprom::begin()
|
|
{
|
|
NVS.begin();
|
|
}
|
|
|
|
void eeprom::set_int(String name , uint64_t val )
|
|
{
|
|
NVS.setInt(name, val);
|
|
}
|
|
|
|
uint64_t eeprom::get_int(String name )
|
|
{
|
|
return NVS.getInt(name);
|
|
}
|
|
|
|
#endif |