Skip to content

Add EEPROM::capacity() method to get _user_defined_data and EEPROM::length() returns _size #5774

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

Closed
wants to merge 3 commits into from

Conversation

hideakitai
Copy link
Contributor

Summary

Related to the issue #5773 and #2280.

  • EEPROM::capacity() method is added and returns _user_defined_size that is set by the constructor
  • EEPROM::length() returns _size that is the true available size of EEPROM

Impact

  • EEPROM::capacity() is added to return _user_defined_data
  • EEPROM::length() returns _size that is the available size of EEPROM

@me-no-dev
Copy link
Member

since your next PR is merged, could you please clarify the connection between both PRs? Is this one obsolete?

@hideakitai
Copy link
Contributor Author

In #5773

I have created two pull requests. If it looks good for you, please consider merging one of them.

I wanted you to choose one or the other. Closing this PR. Thanks!

@hideakitai hideakitai closed this Oct 25, 2021
@hideakitai hideakitai deleted the eeprom_fix_length_1 branch October 25, 2021 06:42
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.

EEPROM.length() always returns zero if using the default global EEPROM instance
2 participants