dev_desc_t

Struct dev_desc_t 

Source
#[repr(C)]
pub struct dev_desc_t {
Show 15 fields pub bLength: u8, pub bDescriptorType: u8, pub bcdUSB: u16, pub bDeviceClass: u8, pub bDeviceSubClass: u8, pub bDeviceProtocol: u8, pub bMaxPacketSize0: u8, pub idVendor: u16, pub idProduct: u16, pub bcdDevice: u16, pub iManufacturer: u8, pub iProduct: u8, pub iSerialNumber: u8, pub bNumConfigurations: u8, pub reserved: u16,
}
Expand description

The dev_desc_t provides the prototype of the structure for the standard USB device descriptor. All the parameters of this structure are as per the standard setup packet defined in the USB2.0 specification.

bLength The bLength parameter indicates the length of the device descriptor in bytes. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bDescriptorType The bDescriptorType parameter indicates the standard descriptor type of this descriptor. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bcdUSB The bcdUSB parameter indicates the USB standard (BCD format) supported by the device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bDeviceClass The bDeviceClass parameter indicates the standard USB class supported by the device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bDeviceSubClass The bDeviceSubClass parameter indicates the standard USB sub-class supported by the device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bDeviceProtocol The bDeviceProtocol parameter indicates the standard USB data transfer protocol supported by the device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bMaxPacketSize0 The bMaxPacketSize0 parameter indicates the Maximum packet size of the Endpoint0 on the device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

idVendor The idVendor parameter indicates Vendor ID of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

idProduct The idProduct parameter indicates Product ID of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bcdDevice The bcdDevice parameter indicates release number (BCD format) of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

iManufacturer The iManufacturer parameter indicates the index of the string descriptor describing the manufacture name of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

iProduct The iProduct parameter indicates index of string descriptor describing the product name of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

iSerialNumber The iSerialNumber parameter indicates the index of the string descriptor describing the serial number of the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

bNumConfigurations The bNumConfigurations parameter indicates number of configurations supported by the connected device. The meaning of this parameter is exactly as defined by the USB2.0 specification.

reserved The reserved parameter does not have a specific meaning. It is provided to make the structure word aligned.

Fields§

§bLength: u8§bDescriptorType: u8§bcdUSB: u16§bDeviceClass: u8§bDeviceSubClass: u8§bDeviceProtocol: u8§bMaxPacketSize0: u8§idVendor: u16§idProduct: u16§bcdDevice: u16§iManufacturer: u8§iProduct: u8§iSerialNumber: u8§bNumConfigurations: u8§reserved: u16

Trait Implementations§

Source§

impl Clone for dev_desc_t

Source§

fn clone(&self) -> dev_desc_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for dev_desc_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for dev_desc_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.