EspSaveCrash icon indicating copy to clipboard operation
EspSaveCrash copied to clipboard

User EEPROM Compatibility

Open bwjohns4 opened this issue 3 years ago • 1 comments

This changes the previous version to instead of setting a persistent flag, users can just add their EEPROM_SIZE to the constructor which is 0 by default. Then if user EEPROM is 0, then call .begin(_offset + _size) but only if the EEPROM is not already begun. This is checked by EEPROM.length(). If the value is not zero then that means the user sketch has already called .begin() and we should call it within this library or it could reallocate the buffer and result in loss of information.

bwjohns4 avatar Jan 25 '22 20:01 bwjohns4

@bwjohns4 I am sorry for the slow reply! Could you please check if the drawing below properly documents the changes?

eeprom-layout drawio

eeprom-layout.drawio.zip

krzychb avatar Feb 07 '22 10:02 krzychb