Skip to content

Conversation

bugadani
Copy link

This is a somewhat experimental change, where I'm mainly looking for feedback at first. There are two cases I can imagine, where erased flash may not read back as 0xFF:

  • Devices with transparent flash encryption, like the ESP32
  • Certain CMSIS-Packs (example) indicate this, although I'm not sure whether this is an error in the pack.

In "normal" cases, read_if_not_empty just issues a single read and checks the bytes, like in the default implementation. In the case of ESP32, the implementation would issue a decryption-bypassing read first to check for the empty value, then read the decrypted bytes again if not empty.

The goal of this addition is to enable storage solutions to work with flash encryption without any additional marker traits or similar complications.

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.

1 participant