USB device descriptor

Source: Internet
Author: User

 

/* USB standard device descriptor */const u8 virtual_com_port_devicedescriptor [] = {0x12,/* blength * // The total length of the USB device descriptor is fixed to 18 bytes, therefore, this parameter is set to 12 h usb_device_descriptor_type,/* bdescriptortype * // The type value of the USB device descriptor, which is fixed to 01 H 0x00. // the USB complies with the standard version number; 0 xxxyz, XX is the main version, Y is the minor version, z is the minor version 0x02,/* bcdusb = 2.00 */0x02,/* bdeviceclass: CDC * // The Standard Device category that USB complies. 0 indicates that the interfaces of devices are independent of each other and belong to different device classes. // 1 ~ Feh indicates a class defined in the USB protocol. 03h indicates the hid class, And 02h indicates the CDC class. // FFH indicates the vendor-defined device Category 0x00,/* bdevicesubclass * // The Standard Device subclass to which the USB device belongs. For display devices (04 H), there are 3 sub-classes. The Code 01h indicates a CRT display, 02h indicates a flat display, and 03h indicates a 3D display. // When bdeviceclass is 0, this value is 0; when this value is FFH, it indicates that the vendor-defined device subclass is 0x00, /* bdeviceprotocol * // The device protocol used. When the value is FFH, it indicates that the device protocol is customized by the supplier 0x40,/* bmaxpacketsize0 * // The maximum packet length (in bytes) supported by the endpoint 0, and the low speed is 8, the full speed is 8, 16, 32, or 64, and the high speed is 64 0x83, // The device supplier ID, so that the host loads the appropriate driver for it 0x04, /* idvendor = 0x0483 */0x40, // product ID, used to distinguish different USB devices from 0x57, /* idproduct = 0x7540 */0x00, // The device version number to help the host load the appropriate driver 0x01,/* bcddevice = 1.00 */1, /* index of string descriptor describing manufacturer * // if not, it can be 0 2,/* index of string descriptor describing product * // if not, it can be 0 3, /* index of string descriptor describing the device's serial number * // if not, it can be 0 0x01/* bnumconfigurations * // number of configurations supported by USB devices };

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.