pub trait ReadNorFlash {
type Error;
const READ_SIZE: usize;
// Required methods
fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>;
fn capacity(&self) -> usize;
}
Expand description
Read only NOR flash trait.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>
fn read(&mut self, offset: u32, bytes: &mut [u8]) -> Result<(), Self::Error>
Read a slice of data from the storage peripheral, starting the read
operation at the given address offset, and reading bytes.len()
bytes.
This should throw an error in case bytes.len()
will be larger than
the peripheral end address.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.