Guest User

Untitled

a guest
Dec 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. // USB Device
  2. static const struct usb_device_descriptor dev = {
  3. .bLength = USB_DT_DEVICE_SIZE, // Length of this descriptor.
  4. .bDescriptorType = USB_DT_DEVICE, // This is a Device Descriptor.
  5. .bcdUSB = 0x0210, // USB Version 2.1. Need to handle special requests e.g. BOS.
  6. .bDeviceClass = USB_CLASS_MISCELLANEOUS, // Miscellaneous Class. For composite device, let host probe the interfaces.
  7. .bDeviceSubClass = 2, // Miscellaneous Common Class
  8. .bDeviceProtocol = 1, // Use Interface Association Descriptor
  9. .bMaxPacketSize0 = 64, // USB packet size
  10. .idVendor = USB_VID, // Official USB Vendor ID
  11. .idProduct = USB_PID, // Official USB Product ID
  12. .bcdDevice = 0x0220, // Device Release number 2.2
  13. .iManufacturer = USB_STRINGS_MANUFACTURER, // Name of maufacturer
  14. .iProduct = USB_STRINGS_PRODUCT, // Name of product
  15. .iSerialNumber = USB_STRINGS_SERIAL_NUMBER, // Serial number
  16. .bNumConfigurations = 1, // How many configurations we support
  17. };
Add Comment
Please, Sign In to add comment