Struct stm32f7xx_hal::flash::Flash
source · [−]pub struct Flash { /* private fields */ }
Expand description
Embedded flash memory.
Implementations
sourceimpl Flash
impl Flash
sourcepub fn erase_sector(
&mut self,
sector_number: u8
) -> Result<EraseSequence<'_>, Error>
pub fn erase_sector(
&mut self,
sector_number: u8
) -> Result<EraseSequence<'_>, Error>
Starts a sector erase sequence.
The returned EraseSequence
object can be used to wait for the completion of the
erase sequence by blocking on the wait
method.
sourcepub fn blocking_erase_sector(&mut self, sector_number: u8) -> Result<(), Error>
pub fn blocking_erase_sector(&mut self, sector_number: u8) -> Result<(), Error>
Erases a flash sector.
This method blocks until the sector is erased or an error occurred.
sourcepub fn mass_erase(&mut self) -> Result<EraseSequence<'_>, Error>
pub fn mass_erase(&mut self) -> Result<EraseSequence<'_>, Error>
Starts a mass erases of the flash memory.
The returned EraseSequence
object can be used to wait for the completion of the
erase sequence by blocking on the wait
method.
sourcepub fn blocking_mass_erase(&mut self) -> Result<(), Error>
pub fn blocking_mass_erase(&mut self) -> Result<(), Error>
Mass erases the flash memory.
This method blocks until the flash is erased or an error occurred.
sourcepub fn program<'a, 'b>(
&'a mut self,
start_offset: usize,
data: &'b [u8]
) -> Result<ProgrammingSequence<'a, 'b>, Error>
pub fn program<'a, 'b>(
&'a mut self,
start_offset: usize,
data: &'b [u8]
) -> Result<ProgrammingSequence<'a, 'b>, Error>
Starts a programming sequence.
Note that you must block on the wait
method in the returned ProgrammingSequence
object
in order to program all bytes.
Auto Trait Implementations
impl RefUnwindSafe for Flash
impl Send for Flash
impl !Sync for Flash
impl Unpin for Flash
impl UnwindSafe for Flash
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more