pub struct BootFlash<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8 = u8::MAX>where
F: NorFlash + ReadNorFlash,{ /* private fields */ }
Expand description
A flash wrapper implementing the Flash and embedded_storage traits.
Implementations§
Trait Implementations§
Source§impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> ErrorType for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> ErrorType for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
Source§impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Flash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: NorFlash + ReadNorFlash,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Flash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: NorFlash + ReadNorFlash,
Source§const BLOCK_SIZE: usize = BLOCK_SIZE
const BLOCK_SIZE: usize = BLOCK_SIZE
The block size that should be used when writing to flash. For most builtin flashes, this is the same as the erase
size of the flash, but for external QSPI flash modules, this can be lower.
Source§const ERASE_VALUE: u8 = ERASE_VALUE
const ERASE_VALUE: u8 = ERASE_VALUE
The erase value of the flash. Typically the default of 0xFF is used, but some flashes use a different value.
Source§impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> NorFlash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> NorFlash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
Source§const WRITE_SIZE: usize = F::WRITE_SIZE
const WRITE_SIZE: usize = F::WRITE_SIZE
The minumum number of bytes the storage peripheral can write
Source§const ERASE_SIZE: usize = F::ERASE_SIZE
const ERASE_SIZE: usize = F::ERASE_SIZE
The minumum number of bytes the storage peripheral can erase
Source§impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> ReadNorFlash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> ReadNorFlash for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: ReadNorFlash + NorFlash,
Source§const READ_SIZE: usize = F::READ_SIZE
const READ_SIZE: usize = F::READ_SIZE
The minumum number of bytes the storage peripheral can read
Auto Trait Implementations§
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Freeze for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: Freeze,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> RefUnwindSafe for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: RefUnwindSafe,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Send for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: Send,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Sync for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: Sync,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> Unpin for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: Unpin,
impl<F, const BLOCK_SIZE: usize, const ERASE_VALUE: u8> UnwindSafe for BootFlash<F, BLOCK_SIZE, ERASE_VALUE>where
F: 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