We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 20cd6ac + 3750c71 commit 6343027Copy full SHA for 6343027
embedded-storage-async/src/nor_flash.rs
@@ -73,3 +73,15 @@ impl<T: NorFlash> NorFlash for &mut T {
73
T::write(self, offset, bytes).await
74
}
75
76
+
77
+/// Marker trait for NorFlash relaxing the restrictions on `write`.
78
+///
79
+/// Writes to the same word twice are now allowed. The result is the logical AND of the
80
+/// previous data and the written data. That is, it is only possible to change 1 bits to 0 bits.
81
82
+/// If power is lost during write:
83
+/// - Bits that were 1 on flash and are written to 1 are guaranteed to stay as 1
84
+/// - Bits that were 1 on flash and are written to 0 are undefined
85
+/// - Bits that were 0 on flash are guaranteed to stay as 0
86
+/// - Rest of the bits in the page are guaranteed to be unchanged
87
+pub trait MultiwriteNorFlash: NorFlash {}
0 commit comments