/// Erases the minimum number of pages to ensure the supplied area is completely erased. This
/// will, in general, erase a larger area due to the page-wise erase of the microcontroller's
/// flash memory.
Erases the minimum number of pages to ensure the supplied area is completely erased. This
will, in general, erase a larger area due to the page-wise erase of the microcontroller's
flash memory.
Erases the minimum number of pages to ensure the supplied area is completely erased . This will in general erase a larger area due to the page - wise erase of the microcontroller ' s flash memory .
pub fn erase_area(&mut self, start: u32, length: usize) -> Result<Erase<'_, T>> {
        // Ensure that the requested area is fully within application flash
        let bootloader_info = self.bootloader_info()?;
        if (bootloader_info.application_base > start)
            || (bootloader_info.application_base as usize + bootloader_info.application_size
                < start as usize + length)
        {
            return Err(Error::InvalidRequest);
        }
        Ok(Erase::area(self, start, length))
    }
pub fn erase_area ( & mut self , start : u32 , length : usize ) -> Result < Erase < ' _ , T > > { // Ensure that the requested area is fully within application flash let bootloader_info = self . bootloader_info ( ) ? ; if ( bootloader_info . application_base > start ) || ( bootloader_info . application_base as usize + bootloader_info . application_size < start as usize + length ) { return Err ( Error :: InvalidRequest ) ; } Ok ( Erase :: area ( self , start , length ) ) }
Erases the minimum number of pages to ensure the supplied area is completely erased.
Erases the minimum number of pages to ensure the supplied area is completely erased .
&mut self
start
u32
length
usize