Skip to content

Commit

Permalink
Arduino core for the esp32 - Add new function "bool isDirty()" to EEP…
Browse files Browse the repository at this point in the history
…ROM.h and EEPROM.cpp (espressif#9611)

* Update EEPROM.h - Added new function: bool isDirty()

* Update EEPROM.cpp - Added new function: bool isDirty()
  • Loading branch information
Rob58329 authored May 10, 2024
1 parent 84376a7 commit afa5f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/EEPROM/src/EEPROM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ void EEPROMClass::end() {
_handle = 0;
}

bool EEPROMClass::isDirty() {
return _dirty;
}

uint8_t EEPROMClass::read(int address) {
if (address < 0 || (size_t)address >= _size) {
return 0;
Expand Down
1 change: 1 addition & 0 deletions libraries/EEPROM/src/EEPROM.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class EEPROMClass {
uint16_t length();
bool commit();
void end();
bool isDirty();

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

0 comments on commit afa5f41

Please sign in to comment.