[2.0.x] Change direct eeprom access to HAL::PersistentStore#11526
[2.0.x] Change direct eeprom access to HAL::PersistentStore#11526thinkyhead merged 2 commits intoMarlinFirmware:bugfix-2.0.xfrom hasenbanck:eeprom-cleanup
Conversation
|
Looks like the PersistentStore api could use a const std::size indexable read and write with no crc, would clean this up a bit I think, I really need to keep better track of my to do list (that may or may not exist) I did know this needed done at some point. |
|
Hi @p3p, thank your for your comment. Do you want to implement the changes yourself to the PersistentStore api, so that I can change this little PR based on your changes, or should I implement these api changes myself in this PR? |
|
I'l put in a PR with the API changes I've been meaning to add a storage capacity and change the namespace design to better fit with Marlins static class usage. |
|
Great, I will then reflect those changes in this PR. Would be nice if you could reference this PR in yours, so that I get updated. |
|
@p3p — Remember that you can check out |
|
@thinkyhead The scope of my changes are going to dwarf this PR so I thought it better to create my own for the update and then update this PR for compatibility. |
2c4b25c to
fd15b14
Compare
|
Thanks for the |
|
I thought you would like it, no more colons ;). I also added the read/write methods that don't need the crc passed, they are all just implemented as pass through atm. changing to capacity rather than E2END required a few offset changes that I hope are correct .. or peoples meshes may get corrupted .. |
Description
Every HAL seem to provide the HAL::PersistentStore interface. The configuration store does already use this interface, so it seems logical that all other code parts should use it to let the HAL abstract the persistence layer.
This commit changes the last two files that use the eeprom library directly.
Benefits
Better usage of the HAL abstraction. HAL then could provide persistence options on their discretion (like MCU internal Backup SRAM).
Notice
My C/C++ skills are limited. If some things can be expressed shorter, please feel free to suggest more elegant solutions. I have a feeling that we could also extend the current HAL::PersistentStore interface to include constant position / non crc methods.