pub struct NorMemory<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> { /* private fields */ }
Expand description
Structure representing a NOR flash memory with a buffer backend.
Implementations§
Source§impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
Sourcepub fn storage(self) -> NorStorage<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
pub fn storage(self) -> NorStorage<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
Converts the NOR memory into a NOR storage.
Trait Implementations§
Source§impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> ErrorType for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> ErrorType for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
Source§type Error = NorFlashErrorKind
type Error = NorFlashErrorKind
Errors returned by this NOR flash.
Source§impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> NorFlash for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> NorFlash for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
Source§fn erase(&mut self, from: u32, to: u32) -> Result<(), Error>
fn erase(&mut self, from: u32, to: u32) -> Result<(), Error>
Erases data in the NOR flash memory from the specified range.
Source§fn write(&mut self, offset: u32, data: &[u8]) -> Result<(), Error>
fn write(&mut self, offset: u32, data: &[u8]) -> Result<(), Error>
Writes data to the NOR flash memory at the specified offset.
Source§const WRITE_SIZE: usize = WRITE_SIZE
const WRITE_SIZE: usize = WRITE_SIZE
The minumum number of bytes the storage peripheral can write
Source§const ERASE_SIZE: usize = ERASE_SIZE
const ERASE_SIZE: usize = ERASE_SIZE
The minumum number of bytes the storage peripheral can erase
Source§impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> ReadNorFlash for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
impl<B: BufferBackend, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> ReadNorFlash for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>
Auto Trait Implementations§
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> Freeze for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: Freeze,
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> RefUnwindSafe for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: RefUnwindSafe,
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> Send for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: Send,
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> Sync for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: Sync,
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> Unpin for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: Unpin,
impl<B, const READ_SIZE: usize, const WRITE_SIZE: usize, const ERASE_SIZE: usize> UnwindSafe for NorMemory<B, READ_SIZE, WRITE_SIZE, ERASE_SIZE>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more