pub trait FlashExt {
// Required methods
fn address(&self) -> usize;
fn len(&self) -> usize;
fn unlocked(&mut self) -> UnlockedFlash<'_>;
fn dual_bank(&self) -> bool;
fn sector(&self, offset: usize) -> Option<FlashSector>;
// Provided method
fn read(&self) -> &[u8] { ... }
}
Expand description
Flash methods implemented for pac::FLASH
Required Methods§
Sourcefn unlocked(&mut self) -> UnlockedFlash<'_>
fn unlocked(&mut self) -> UnlockedFlash<'_>
Unlock flash for erasing/programming until this method’s result is dropped
fn dual_bank(&self) -> bool
Sourcefn sector(&self, offset: usize) -> Option<FlashSector>
fn sector(&self, offset: usize) -> Option<FlashSector>
Returns flash memory sector of a given offset. Returns none if offset is out of range.