fn enter_update_mode(&mut self) -> Result<(), Error> {
        self.bus.configure(UartBaud::DFU, false);

        let mut ack = [0u8; 3];
        for _ in 0..3 {
            self.bus.write(&[b'#']).map_err(|_| FdfuError::SamBaWrite("update mode command '#'".to_owned()))?;
            self.bus.read_exact(&mut ack).map_err(|_| FdfuError::SamBaRead("update mode ack 0x0A0D3E".to_owned()))?;

            if &ack[..] == b"\n\r>" {
                debug!("Entered update mode");
                let _ = self.sender.send(Progress::UpdateMode);
                return Ok(())
            }
            self.enter_dfu();
        }

        Err(FdfuError::UpdateMode.into())
    }
/// Sets the ATSAM into Device Firmware Update (DFU) mode.
Sets the ATSAM into Device Firmware Update (DFU) mode.
Sets the ATSAM into Device Firmware Update ( DFU ) mode .
fn enter_update_mode(&mut self) -> Result<(), Error> {
        self.bus.configure(UartBaud::DFU, false);
        let mut ack = [0u8; 3];
        for _ in 0..3 {
            self.bus.write(&[b'#']).map_err(|_| FdfuError::SamBaWrite("update mode command '#'".to_owned()))?;
            self.bus.read_exact(&mut ack).map_err(|_| FdfuError::SamBaRead("update mode ack 0x0A0D3E".to_owned()))?;
            if &ack[..] == b"\n\r>" {
                debug!("Entered update mode");
                let _ = self.sender.send(Progress::UpdateMode);
                return Ok(())
            }
            self.enter_dfu();
        }
        Err(FdfuError::UpdateMode.into())
    }
fn enter_update_mode ( & mut self ) -> Result < ( ) , Error > { self . bus . configure ( UartBaud :: DFU , false ) ; let mut ack = [ 0u8 ; 3 ] ; for _ in 0 .. 3 { self . bus . write ( & [ b'#' ] ) . map_err ( | _ | FdfuError :: SamBaWrite ( " " . to_owned ( ) ) ) ? ; self . bus . read_exact ( & mut ack ) . map_err ( | _ | FdfuError :: SamBaRead ( " " . to_owned ( ) ) ) ? ; if & ack [ .. ] == b" \n \r " { debug ! ( " " ) ; let _ = self . sender . send ( Progress :: UpdateMode ) ; return Ok ( ( ) ) } self . enter_dfu ( ) ; } Err ( FdfuError :: UpdateMode . into ( ) ) }
Sets the ATSAM into Device Firmware Update (DFU) mode.
Sets the ATSAM into Device Firmware Update ( DFU ) mode .
&mut self
&mut self