Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions uefi-raw/src/protocol/usb/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ newtype_enum! {
}
}

#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(C)]
pub struct DeviceRequest {
pub request_type: u8,
Expand All @@ -22,7 +22,7 @@ pub struct DeviceRequest {
pub length: u16,
}

#[derive(Default, Debug)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[repr(transparent)]
pub struct UsbTransferStatus(pub u32);

Expand All @@ -33,7 +33,7 @@ pub type AsyncUsbTransferCallback = unsafe extern "efiapi" fn(
status: UsbTransferStatus,
) -> Status;

#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(C)]
pub struct DeviceDescriptor {
pub length: u8,
Expand All @@ -52,7 +52,7 @@ pub struct DeviceDescriptor {
pub num_configurations: u8,
}

#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(C)]
pub struct ConfigDescriptor {
pub length: u8,
Expand All @@ -65,7 +65,7 @@ pub struct ConfigDescriptor {
pub max_power: u8,
}

#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(C)]
pub struct InterfaceDescriptor {
pub length: u8,
Expand All @@ -79,7 +79,7 @@ pub struct InterfaceDescriptor {
pub interface: u8,
}

#[derive(Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(C)]
pub struct EndpointDescriptor {
pub length: u8,
Expand All @@ -106,8 +106,8 @@ pub struct UsbIoProtocol {
this: *mut Self,
device_endpoint: u8,
data: *mut ffi::c_void,
data_length: usize,
timeout: u32,
data_length: *mut usize,
timeout: usize,
status: *mut UsbTransferStatus,
) -> Status,
pub async_interrupt_transfer: unsafe extern "efiapi" fn(
Expand Down