pub(crate) fn erase_page(&mut self, page: Page) -> Result<()> {
        let request_packet = [page.into()];
        let mut status_packet = [0u8];
        self.send_command(Command::ErasePage, &request_packet, &mut status_packet)?;
        // TODO: Add more fine-grained result code matching
        match status_packet[0] {
            0 => Ok(()),
            code => Err(Error::EraseError(code.into())),
        }
    }
/// Erases a single flash page. Caution: The page index is unchecked.
Erases a single flash page. Caution: The page index is unchecked.
Erases a single flash page . Caution : The page index is unchecked .
pub(crate) fn erase_page(&mut self, page: Page) -> Result<()> {
        let request_packet = [page.into()];
        let mut status_packet = [0u8];
        self.send_command(Command::ErasePage, &request_packet, &mut status_packet)?;
        // TODO: Add more fine-grained result code matching
        match status_packet[0] {
            0 => Ok(()),
            code => Err(Error::EraseError(code.into())),
        }
    }
pub ( crate ) fn erase_page ( & mut self , page : Page ) -> Result < ( ) > { let request_packet = [ page . into ( ) ] ; let mut status_packet = [ 0u8 ] ; self . send_command ( Command :: ErasePage , & request_packet , & mut status_packet ) ? ; // TODO: Add more fine-grained result code matching match status_packet [ 0 ] { 0 => Ok ( ( ) ) , code => Err ( Error :: EraseError ( code . into ( ) ) ) , } }
Erases a single flash page.
Erases a single flash page .
&mut self
page
Page
&mut self
page
Page