Trait embedded_storage::Storage
source · pub trait Storage: ReadStorage {
// Required method
fn write(&mut self, offset: u32, bytes: &[u8]) -> Result<(), Self::Error>;
}
Expand description
Transparent read/write storage trait
Required Methods§
sourcefn write(&mut self, offset: u32, bytes: &[u8]) -> Result<(), Self::Error>
fn write(&mut self, offset: u32, bytes: &[u8]) -> Result<(), Self::Error>
Write a slice of data to the storage peripheral, starting the write
operation at the given address offset (between 0 and self.capacity()
).
NOTE: This function will automatically erase any pages necessary to write the given data, and might as such do RMW operations at an undesirable performance impact.