File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
embedded-storage-async/src Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -73,3 +73,15 @@ impl<T: NorFlash> NorFlash for &mut T {
73
73
T :: write ( self , offset, bytes) . await
74
74
}
75
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 { }
You can’t perform that action at this time.
0 commit comments