pub struct FlashStorage<'d> { /* private fields */ }Expand description
Flash storage abstraction.
This only implements traits from embedded_storage.
If you need to use this struct where traits from embedded_storage_async are needed, you can
use embassy_embedded_hal::adapter::BlockingAsync or
embassy_embedded_hal::adapter::YieldingAsync wrappers.
Implementations§
Source§impl<'d> FlashStorage<'d>
impl<'d> FlashStorage<'d>
Sourcepub const SECTOR_SIZE: u32 = 4096
pub const SECTOR_SIZE: u32 = 4096
Flash sector size in bytes.
Sourcepub const BLOCK_SIZE: u32 = 65536
pub const BLOCK_SIZE: u32 = 65536
Flash block size in bytes.
Source§impl<'d> FlashStorage<'d>
impl<'d> FlashStorage<'d>
Sourcepub fn multicore_auto_park(self) -> FlashStorage<'d>
pub fn multicore_auto_park(self) -> FlashStorage<'d>
Enable auto parking of the second core before writing to flash. The other core will be automatically un-parked when the write is complete.
Sourcepub unsafe fn multicore_ignore(self) -> FlashStorage<'d>
pub unsafe fn multicore_ignore(self) -> FlashStorage<'d>
Do not check if the second core is active before writing to flash.
§Safety
Only enable this if you are sure that the second core is not fetching instructions from the flash during the write.
Trait Implementations§
Source§impl<'d> Debug for FlashStorage<'d>
impl<'d> Debug for FlashStorage<'d>
Source§impl ErrorType for FlashStorage<'_>
impl ErrorType for FlashStorage<'_>
Source§type Error = FlashStorageError
type Error = FlashStorageError
Errors returned by this NOR flash.
Source§impl NorFlash for FlashStorage<'_>
impl NorFlash for FlashStorage<'_>
Source§const WRITE_SIZE: usize
const WRITE_SIZE: usize
The minumum number of bytes the storage peripheral can write
Source§const ERASE_SIZE: usize
const ERASE_SIZE: usize
The minumum number of bytes the storage peripheral can erase