Skip to content

A "bool isDirty();" would be useful in "libraries\EEPROM\EEPROM.h" & "libraries\EEPROM\EEPROM.cpp" #9589

Closed
@Rob58329

Description

@Rob58329

Related area

"libraries\EEPROM\EEPROM.h" & "libraries\EEPROM\EEPROM.cpp"

Hardware specification

ESP32 and also ESP8266

Is your feature request related to a problem?

To reduce eeprom usage in deep-sleeping Sensors which store data-readings in EEPROM, I initally store readings in the rtc-memory (which is retained over deep-sleep), and then only transfer them into EEPROM every hour or so, which significantly reduces the number of "EEPROM.commit()" commands required.

However, it is very useful to know if the EEPROM is dirty (for some other reason) before going to sleep, as if it is then I can transfer any readings from rtc-memory into the EEPROM before doing an "EEPROM.commit()" and going to sleep.

Describe the solution you'd like

(1) add "bool isDirty();" to "libraries\EEPROM\EEPROM.h"
(2) add "bool EEPROMClass::isDirty() {return _dirty;}" to "libraries\EEPROM\EEPROM.cpp"

(I have manually edited these files on my system.)

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions