Skip to content
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

User EEPROM Compatibility #17

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bwjohns4
Copy link
Contributor

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.

@krzychb
Copy link
Owner

krzychb commented Feb 7, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants