EEPROM.length() issue? #2506
Replies: 2 comments
-
Yeah, that seems like a difference from the "standard." I copied the code and behavior from ESP8266 core I was working on at the time and That said, LittleFS is much more useful and suited for the RP2040. |
Beta Was this translation helpful? Give feedback.
-
First of all, thanks for the amazingly fast response! I'll definitely check out littlefs and open a PR. Thanks for the awesome work on this project! |
Beta Was this translation helpful? Give feedback.
-
Background (feel free to skip)
I have an Arduino project that i've been working on where I need to persist some config so I've been using the EEPROM. The Arduino form factor is important because I have a pile of shields relevant to the project. Recently, I discovered the Pi 20240 Metro and decided to give it a whirl in the hopes of increasing board options for the project.
Issue(?)
The EEPROM.length() method should, as I understand it, return the number of cells (bytes) available without regard to whether or not they are written to. The method as implemented here, seems to return the quantity used--which defaults, naturally, to zero. Shouldn't it be 4096? If littlefs would sort me out, I'm happy to check it out but I believe this issue is still a breaking issue with regards to compatibility with other Arduino libraries/projects.
Beta Was this translation helpful? Give feedback.
All reactions