pub fn read_crc(&mut self, start: u32, length: usize) -> Result<u32> {
        let mut request_packet = vec![0u8; 8];
        request_packet[0..4].copy_from_slice(&start.to_le_bytes());
        request_packet[4..8].copy_from_slice(&(length as u32).to_le_bytes());
        let mut crc_packet = [0u8; 4];

        self.send_command(Command::ReadCrc, &request_packet, &mut crc_packet)?;

        let crc = u32::from_le_bytes(crc_packet);

        Ok(crc)
    }
/// Queries a CRC32 from the target for a given memory area.
Queries a CRC32 from the target for a given memory area.
Queries a CRC32 from the target for a given memory area .
pub fn read_crc(&mut self, start: u32, length: usize) -> Result<u32> {
        let mut request_packet = vec![0u8; 8];
        request_packet[0..4].copy_from_slice(&start.to_le_bytes());
        request_packet[4..8].copy_from_slice(&(length as u32).to_le_bytes());
        let mut crc_packet = [0u8; 4];
        self.send_command(Command::ReadCrc, &request_packet, &mut crc_packet)?;
        let crc = u32::from_le_bytes(crc_packet);
        Ok(crc)
    }
pub fn read_crc ( & mut self , start : u32 , length : usize ) -> Result < u32 > { let mut request_packet = vec ! [ 0u8 8 ] ; request_packet [ 0 .. 4 ] . copy_from_slice ( & start . to_le_bytes ( ) ) ; request_packet [ 4 .. 8 ] . copy_from_slice ( & ( length as u32 ) . to_le_bytes ( ) ) ; let mut crc_packet = [ 0u8 ; 4 ] ; self . send_command ( Command :: ReadCrc , & request_packet , & mut crc_packet ) ? ; let crc = u32 :: from_le_bytes ( crc_packet ) ; Ok ( crc ) }
Queries a CRC32 from the target for a given memory area.
Queries a CRC32 from the target for a given memory area .
&mut self
start
u32
length
usize
&mut self
start
u32
length
usize