fn read_usb_response(&self) -> Result<(), Error> {
        let mut buf = [0_u8; 13];
        UsbHandle::usb_bulk_recv(&self.device_handle, self.endpoint_in, &mut buf)
            .context("unable to receive data in bulk from USB")?;
        if &buf[..4] == b"AWUS" {
            Ok(())
        } else {
            Err(FelError::Response {
                expected: "AWUS[...]",
                found: format!("{}[...]", String::from_utf8_lossy(&buf[..4])),
            }
            .into())
        }
    }
/// Reads and discards the USB response. It will check if the response is correct.
Reads and discards the USB response. It will check if the response is correct.
Reads and discards the USB response . It will check if the response is correct .
fn read_usb_response(&self) -> Result<(), Error> {
        let mut buf = [0_u8; 13];
        UsbHandle::usb_bulk_recv(&self.device_handle, self.endpoint_in, &mut buf)
            .context("unable to receive data in bulk from USB")?;
        if &buf[..4] == b"AWUS" {
            Ok(())
        } else {
            Err(FelError::Response {
                expected: "AWUS[...]",
                found: format!("{}[...]", String::from_utf8_lossy(&buf[..4])),
            }
            .into())
        }
    }
fn read_usb_response ( & self ) -> Result < ( ) , Error > { let mut buf = [ 0_u8 ; 13 ] ; UsbHandle :: usb_bulk_recv ( & self . device_handle , self . endpoint_in , & mut buf ) . context ( " " ) ? ; if & buf [ .. 4 ] == b" " { Ok ( ( ) ) } else { Err ( FelError :: Response { expected : " " , found : format ! ( " " String from_utf8_lossy ( buf [ 4 ] ) ) , } . into ( ) ) } }
Reads and discards the USB response.
Reads and discards the USB response .
&self
&self