Skip to content

Commit afa5f41

Browse files
authored
Arduino core for the esp32 - Add new function "bool isDirty()" to EEPROM.h and EEPROM.cpp (espressif#9611)
* Update EEPROM.h - Added new function: bool isDirty() * Update EEPROM.cpp - Added new function: bool isDirty()
1 parent 84376a7 commit afa5f41

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libraries/EEPROM/src/EEPROM.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ void EEPROMClass::end() {
133133
_handle = 0;
134134
}
135135

136+
bool EEPROMClass::isDirty() {
137+
return _dirty;
138+
}
139+
136140
uint8_t EEPROMClass::read(int address) {
137141
if (address < 0 || (size_t)address >= _size) {
138142
return 0;

libraries/EEPROM/src/EEPROM.h

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class EEPROMClass {
4545
uint16_t length();
4646
bool commit();
4747
void end();
48+
bool isDirty();
4849

4950
uint8_t *getDataPtr();
5051
uint16_t convert(bool clear, const char *EEPROMname = "eeprom", const char *nvsname = "eeprom");

0 commit comments

Comments
 (0)