Add tests for flash storage#36
Open
katyo wants to merge 5 commits intorust-embedded-community:masterfrom
Open
Conversation
MathiasKoch
reviewed
May 9, 2023
|
|
||
| /// Simple RAM-backed flash storage implementation for tests | ||
| #[derive(Clone, Copy, Debug)] | ||
| pub struct MockFlash< |
Collaborator
There was a problem hiding this comment.
Could you move this inside the mod tests module?
Author
There was a problem hiding this comment.
The idea is export this struct to use for testing dependent crates.
70dde98 to
81d5b10
Compare
Despite it looks little bit low-level but it works well with unaligned access. I/O operations optimized by splitting it to stages: - Not aligned start - Aligned middle - Not Aligned end Each stage may or may not be needed depending from memory offset and data length. Also the data checked to determine that erase and/or write needed or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.