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

Add a NOR trait to encode that word clearing is supported #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

korken89
Copy link

@korken89 korken89 commented Aug 4, 2024

This is to encode MCU flashes that have ECC, where it is common that only a complete clear of the word is allowed. This is a more restrictive version of MultiwriteNorFlash as it cannot encode flashes with ECC support.

Example use-case of this trait: tweedegolf/sequential-storage#63

This is to encode MCU flashes that have ECC, where
it is common that only a complete clear of the
word is allowed. This is a more restrictive
version of `MultiwriteNorFlash` as it cannot
encode flashes with ECC support.
@korken89 korken89 force-pushed the add-wordclear-nor branch from a742ef4 to 14c7cb2 Compare August 4, 2024 09:21
@diondokter
Copy link
Contributor

While obvious to add the trait like this, I'm not sure this is the best way to do it...

In Sequential-Storage I'd like to be able to switch behaviour depending on whether a true multiwrite can be done, or only a clear to 0. I'm not sure on how to do this.

However, say we change the MultiWriteNorFlash trait to have an associated const bool that declares the ability, then we could make a meaningful selection so it can use the pessimistic algo for clear-only.
But I'm still not sure that's the best API

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.

2 participants