We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f6a7a5 commit fbc2268Copy full SHA for fbc2268
src/lib.rs
@@ -137,8 +137,15 @@ pub trait NorFlash {
137
fn regions(&self) -> Vec<Self::Region, U4>;
138
}
139
140
-/// ...
141
-pub trait UniformNorFlash: NorFlash {
+/// Marker trait for NOR flashes with uniform erase and page sizes across the whole
+/// address range
142
+pub trait UniformNorFlash {}
143
+
144
+/// Automatic implementation of region trait for uniform NOR flashes
145
+impl<T> NorFlashRegion for T
146
+where
147
+ T: NorFlash + UniformNorFlash,
148
+{
149
/// The range of possible addresses within the peripheral.
150
///
151
/// (start_addr, end_addr)
0 commit comments