Skip to content

Arduino core for the esp32 - Add new function "bool isDirty()" to EEPROM.h and EEPROM.cpp #9611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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