pub fn fel_write(&self, offset: u32, buf: &[u8]) -> Result<(), Error> {
        assert!(
            u32::max_value() - buf.len() as u32 > offset,
            "cannot write 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_WRITE, offset, buf.len() as u32)
            .context("unable to send AW_FEL_1_WRITER FEL request")?;
        self.usb_write(buf).context("unable write data to USB")?;
        self.read_fel_status()
            .context("unable to read FEL status")?;
        Ok(())
    }
/// Writes to the FEL device memory at the given offset.
///
/// It **will panic** if the buffer overflows total memory address space.
Writes to the FEL device memory at the given offset.
It **will panic** if the buffer overflows total memory address space.
Writes to the FEL device memory at the given offset . It ** will panic ** if the buffer overflows total memory address space .
pub fn fel_write(&self, offset: u32, buf: &[u8]) -> Result<(), Error> {
        assert!(
            u32::max_value() - buf.len() as u32 > offset,
            "cannot write 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_WRITE, offset, buf.len() as u32)
            .context("unable to send AW_FEL_1_WRITER FEL request")?;
        self.usb_write(buf).context("unable write data to USB")?;
        self.read_fel_status()
            .context("unable to read FEL status")?;
        Ok(())
    }
pub fn fel_write ( & self , offset : u32 , buf : & [ 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_WRITE , offset , buf . len ( ) as u32 ) . context ( " " ) ? ; self . usb_write ( buf ) . context ( " " ) ? ; self . read_fel_status ( ) . context ( " " ) ? ; Ok ( ( ) ) }
Writes to the FEL device memory at the given offset.
Writes to the FEL device memory at the given offset .
&self
offset
u32
buf
&[u8]
&self
offset
u32
buf
&[u8]