pub fn fel_read(&self, offset: u32, buf: &mut [u8]) -> Result<(), Error> {
        assert!(
            u32::max_value() - buf.len() as u32 > offset,
            "cannot read above {:#010x} - offset: {:#010x}, buffer length: {:#010x}, bytes above \
             offset: {:#010x}",
            u32::max_value(),
            offset,
            buf.len(),
            u32::max_value() - offset
        );
        self.send_fel_request(AW_FEL_1_READ, offset, buf.len() as u32)
            .context("unable to send AW_FEL_1_READ FEL request")?;
        self.usb_read(buf).context("unable read data from USB")?;
        self.read_fel_status()
            .context("unable to read FEL status")?;
        Ok(())
    }
/// Reads from the FEL device memory at the given offset.
///
/// It will fill all the given buffer, but it **will panic** if the buffer overflows total
/// memory address space.
Reads from the FEL device memory at the given offset.
It will fill all the given buffer, but it **will panic** if the buffer overflows total
memory address space.
Reads from the FEL device memory at the given offset . It will fill all the given buffer but it ** will panic ** if the buffer overflows total memory address space .
pub fn fel_read(&self, offset: u32, buf: &mut [u8]) -> Result<(), Error> {
        assert!(
            u32::max_value() - buf.len() as u32 > offset,
            "cannot read above {:#010x} - offset: {:#010x}, buffer length: {:#010x}, bytes above \
             offset: {:#010x}",
            u32::max_value(),
            offset,
            buf.len(),
            u32::max_value() - offset
        );
        self.send_fel_request(AW_FEL_1_READ, offset, buf.len() as u32)
            .context("unable to send AW_FEL_1_READ FEL request")?;
        self.usb_read(buf).context("unable read data from USB")?;
        self.read_fel_status()
            .context("unable to read FEL status")?;
        Ok(())
    }
pub fn fel_read ( & self , offset : u32 , buf : & mut [ u8 ] ) -> Result < ( ) , Error > { assert ! ( u32 max_value ( ) buf len ( ) as u32 offset " \
 " u32 max_value ( ) offset buf len ( ) u32 max_value ( ) offset ) ; self . send_fel_request ( AW_FEL_1_READ , offset , buf . len ( ) as u32 ) . context ( " " ) ? ; self . usb_read ( buf ) . context ( " " ) ? ; self . read_fel_status ( ) . context ( " " ) ? ; Ok ( ( ) ) }
Reads from the FEL device memory at the given offset.
Reads from the FEL device memory at the given offset .
&self
offset
u32
buf
&mut [u8]
&self
offset
u32
buf
&mut [u8]