[−][src]Struct aw_fel::UsbHandle
USB device handle.
Fields
device_handle: DeviceHandle<'h>
endpoint_in: u8
endpoint_out: u8
iface_detached: bool
Methods
impl<'h> UsbHandle<'h>
[src]
impl<'h> UsbHandle<'h>
fn from_device(device: &Device<'h>) -> Result<UsbHandle<'h>, Error>
[src]
fn from_device(device: &Device<'h>) -> Result<UsbHandle<'h>, Error>
Creates a USB handle from the given device.
fn claim(&mut self, device: &Device<'h>) -> Result<(), Error>
[src]
fn claim(&mut self, device: &Device<'h>) -> Result<(), Error>
Claim the given device.
fn get_endpoints(&mut self, device: &Device<'h>) -> Result<(), Error>
[src]
fn get_endpoints(&mut self, device: &Device<'h>) -> Result<(), Error>
Updates the endpoints of the USB handle.
pub fn fel_fill(
&self,
offset: u32,
num_bytes: u32,
byte: u8
) -> Result<(), Error>
[src]
pub fn fel_fill(
&self,
offset: u32,
num_bytes: u32,
byte: u8
) -> Result<(), Error>
Fill memory at the given offset.
It will fill num_size
bytes with the given byte.
pub fn fel_read(&self, offset: u32, buf: &mut [u8]) -> Result<(), Error>
[src]
pub fn fel_read(&self, offset: u32, buf: &mut [u8]) -> Result<(), Error>
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_write(&self, offset: u32, buf: &[u8]) -> Result<(), Error>
[src]
pub fn fel_write(&self, offset: u32, buf: &[u8]) -> Result<(), Error>
Writes to the FEL device memory at the given offset.
It will panic if the buffer overflows total memory address space.
pub fn fel_execute(&self, offset: u32) -> Result<(), Error>
[src]
pub fn fel_execute(&self, offset: u32) -> Result<(), Error>
Makes the FEL device execute the code at the given address.
fn get_fel_version(&self) -> Result<Version, Error>
[src]
fn get_fel_version(&self) -> Result<Version, Error>
Gets the SoC version information.
fn read_fel_status(&self) -> Result<(), Error>
[src]
fn read_fel_status(&self) -> Result<(), Error>
Reads the FEL status.
fn send_fel_request(
&self,
req_type: u32,
addr: u32,
len: u32
) -> Result<(), Error>
[src]
fn send_fel_request(
&self,
req_type: u32,
addr: u32,
len: u32
) -> Result<(), Error>
Sends a FEL request.
fn usb_read(&self, data: &mut [u8]) -> Result<(), Error>
[src]
fn usb_read(&self, data: &mut [u8]) -> Result<(), Error>
Reads the given data from the USB.
fn usb_write(&self, data: &[u8]) -> Result<(), Error>
[src]
fn usb_write(&self, data: &[u8]) -> Result<(), Error>
Writes the given data to the USB.
fn send_usb_request(&self, req_type: u16, len: u32) -> Result<(), Error>
[src]
fn send_usb_request(&self, req_type: u16, len: u32) -> Result<(), Error>
Sends the request type USB request.
fn read_usb_response(&self) -> Result<(), Error>
[src]
fn read_usb_response(&self) -> Result<(), Error>
Reads and discards the USB response. It will check if the response is correct.
fn usb_bulk_send(
device_handle: &DeviceHandle,
endpoint: u8,
data: &[u8]
) -> Result<(), Error>
[src]
fn usb_bulk_send(
device_handle: &DeviceHandle,
endpoint: u8,
data: &[u8]
) -> Result<(), Error>
Sends data to the USB in bulk.
It will divide the data in chunks.
fn usb_bulk_recv(
device_handle: &DeviceHandle,
endpoint: u8,
data: &mut [u8]
) -> Result<(), Error>
[src]
fn usb_bulk_recv(
device_handle: &DeviceHandle,
endpoint: u8,
data: &mut [u8]
) -> Result<(), Error>
Receives data from the USB in bulk.
It will divide the data in chunks.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more