Last active
December 17, 2018 08:52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USB Device | |
static const struct usb_device_descriptor dev = { | |
.bLength = USB_DT_DEVICE_SIZE, // Length of this descriptor. | |
.bDescriptorType = USB_DT_DEVICE, // This is a Device Descriptor. | |
.bcdUSB = 0x0210, // USB Version 2.1. Need to handle special requests e.g. BOS. | |
.bDeviceClass = USB_CLASS_MISCELLANEOUS, // Miscellaneous Class. For composite device, let host probe the interfaces. | |
.bDeviceSubClass = 2, // Miscellaneous Common Class | |
.bDeviceProtocol = 1, // Use Interface Association Descriptor | |
.bMaxPacketSize0 = 64, // USB packet size | |
.idVendor = USB_VID, // Official USB Vendor ID | |
.idProduct = USB_PID, // Official USB Product ID | |
.bcdDevice = 0x0220, // Device Release number 2.2 | |
.iManufacturer = 1, // Name of maufacturer (index of string descriptor) | |
.iProduct = 2, // Name of product (index of string descriptor) | |
.iSerialNumber = 2, // Serial number (index of string descriptor) | |
.bNumConfigurations = 1, // How many configurations we support | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment