pub struct XhciEndpointDescriptor {
pub endpoint_address: u8,
pub attributes: u8,
pub max_packet_size: u16,
pub interval: u8,
}Expand description
Parsed USB Endpoint Descriptor (7 bytes)
Fields§
§endpoint_address: u8§attributes: u8§max_packet_size: u16§interval: u8Implementations§
Source§impl XhciEndpointDescriptor
impl XhciEndpointDescriptor
Sourcepub fn parse(data: &[u8]) -> Result<Self, KernelError>
pub fn parse(data: &[u8]) -> Result<Self, KernelError>
Parse from a raw descriptor buffer (at least 7 bytes)
Sourcepub fn endpoint_number(&self) -> u8
pub fn endpoint_number(&self) -> u8
Get the endpoint number (bits 3:0)
Sourcepub fn transfer_type(&self) -> EndpointTransferType
pub fn transfer_type(&self) -> EndpointTransferType
Get the transfer type
Trait Implementations§
Source§impl Clone for XhciEndpointDescriptor
impl Clone for XhciEndpointDescriptor
Source§fn clone(&self) -> XhciEndpointDescriptor
fn clone(&self) -> XhciEndpointDescriptor
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XhciEndpointDescriptor
impl Debug for XhciEndpointDescriptor
impl Copy for XhciEndpointDescriptor
Auto Trait Implementations§
impl Freeze for XhciEndpointDescriptor
impl RefUnwindSafe for XhciEndpointDescriptor
impl Send for XhciEndpointDescriptor
impl Sync for XhciEndpointDescriptor
impl Unpin for XhciEndpointDescriptor
impl UnwindSafe for XhciEndpointDescriptor
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)