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

Implement page-based log rotation (wrapping) #16

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

Conversation

eupn
Copy link
Contributor

@eupn eupn commented Jun 20, 2021

Depends on #15.

As discussed in #13, this PR implements page-based circular storage.

Uses a modified version of embedded-storage crate that adds a single ErasableStorage trait that has to be implemented for the used storage type.

Fixes #13

P.S.: tested verified in hardware.

@MathiasKoch
Copy link
Member

@eupn could you fix the conflicts on this one? Then I will merge it 👍

Thanks for the great work!

@MathiasKoch
Copy link
Member

MathiasKoch commented Jun 28, 2021

The one thing in this PR i am not super fond about is the patched embedded-storage? Could your start out by PR'ing that one? I am a maintainer there as well, so i should be able to get the discussion going on whether it's a good idea or not, with the others.

I think you should be able to auto-implement the trait as

impl<T: NorFlash> EraseableStorage for T {}

The alternative being to change this crate to rely on NorFlash instead of Storage, and then do the RMW operations ourselves here?

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.

Allow wrapping storage (circular storage)
2 participants