/// Sets the ATSAM into normal mode (i.e. not firmware update mode).
Sets the ATSAM into normal mode .
Sets the ATSAM into normal mode .
fn enter_normal_mode(&mut self) -> Result<(), Error> {
        self.bus.configure(UartBaud::DFU, false);
        let mut ack = [0u8; 2];
        for _ in 0..8 {
            self.bus.write(b"N#").map_err(|_| FdfuError::SamBaWrite("normal mode command 'N#'".to_owned()))?;
            self.bus.read_exact(&mut ack).map_err(|_| FdfuError::SamBaRead("normal mode ack 0x0A0D".to_owned()))?;
            if ack == [0x0A, 0x0D] {
                debug!("Entered normal mode");
                let _ = self.sender.send(Progress::NormalMode);
                return Ok(());
            }
        }
        Err(FdfuError::NormalMode.into())
    }
fn enter_normal_mode ( & mut self ) -> Result < ( ) , Error > { self . bus . configure ( UartBaud :: DFU , false ) ; let mut ack = [ 0u8 ; 2 ] ; for _ in 0 .. 8 { self . bus . write ( b" " ) . map_err ( | _ | FdfuError :: SamBaWrite ( " " . to_owned ( ) ) ) ? ; self . bus . read_exact ( & mut ack ) . map_err ( | _ | FdfuError :: SamBaRead ( " " . to_owned ( ) ) ) ? ; if ack == [ 0x0A , 0x0D ] { debug ! ( " " ) ; let _ = self . sender . send ( Progress :: NormalMode ) ; return Ok ( ( ) ) ; } } Err ( FdfuError :: NormalMode . into ( ) ) }
Sets the ATSAM into normal mode (i.e.
Sets the ATSAM into normal mode ( i . e .
&mut self