Skip to content

Instantly share code, notes, and snippets.

@cjameshuff
Created October 4, 2011 21:13
Show Gist options
  • Save cjameshuff/1262830 to your computer and use it in GitHub Desktop.
Save cjameshuff/1262830 to your computer and use it in GitHub Desktop.
{bLength: (uint8_t)18,
bDescriptorType: (uint8_t)1,
bcdUSB: (uint16_t)512,
bDeviceClass: (uint8_t)255,
bDeviceSubClass: (uint8_t)254,
bDeviceProtocol: (uint8_t)0,
bMaxPacketSize0: (uint8_t)64,
idVendor: (uint16_t)8137,
idProduct: (uint16_t)3,
bcdDevice: (uint16_t)256,
iManufacturer: (uint8_t)1,
iProduct: (uint8_t)2,
iSerialNumber: (uint8_t)3,
bNumConfigurations: (uint8_t)1}
const uint8_t USB_DeviceDescriptor[] = {
0x12, 0x01, 0x00, 0x02, 0xFF, 0xFE, 0x00, 0x40, 0xC9, 0x1F, 0x03, 0x00, 0x00, 0x01, 0x01, 0x02, 0x03, 0x01
};
{bLength: (uint8_t)9,
bDescriptorType: (uint8_t)2,
wTotalLength: (uint16_t)48,
bNumInterfaces: (uint8_t)2,
bConfigurationValue: (uint8_t)1,
iConfiguration: (uint8_t)0,
bmAttributes: (uint8_t)128,
bMaxPower: (uint8_t)50}
{bLength: (uint8_t)9,
bDescriptorType: (uint8_t)4,
bInterfaceNumber: (uint8_t)0,
bAlternateSetting: (uint8_t)0,
bNumEndpoints: (uint8_t)1,
bInterfaceClass: (uint8_t)254,
bInterfaceSubClass: (uint8_t)0,
bInterfaceProtocol: (uint8_t)0,
iInterface: (uint8_t)94}
{bLength: (uint8_t)7,
bDescriptorType: (uint8_t)5,
bEndpointAddress: (uint8_t)129,
bmAttributes: (uint8_t)3,
wMaxPacketSize: (uint16_t)16,
bInterval: (uint8_t)2}
{bLength: (uint8_t)9,
bDescriptorType: (uint8_t)4,
bInterfaceNumber: (uint8_t)1,
bAlternateSetting: (uint8_t)0,
bNumEndpoints: (uint8_t)2,
bInterfaceClass: (uint8_t)254,
bInterfaceSubClass: (uint8_t)0,
bInterfaceProtocol: (uint8_t)0,
iInterface: (uint8_t)94}
{bLength: (uint8_t)7,
bDescriptorType: (uint8_t)5,
bEndpointAddress: (uint8_t)2,
bmAttributes: (uint8_t)2,
wMaxPacketSize: (uint16_t)64,
bInterval: (uint8_t)0}
{bLength: (uint8_t)7,
bDescriptorType: (uint8_t)5,
bEndpointAddress: (uint8_t)130,
bmAttributes: (uint8_t)2,
wMaxPacketSize: (uint16_t)64,
bInterval: (uint8_t)0}
const uint8_t USB_ConfigDescriptor[] = {
0x09, 0x02, 0x30, 0x00, 0x02, 0x01, 0x00, 0x80, 0x32,
0x09, 0x04, 0x00, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x5E,
0x07, 0x05, 0x81, 0x03, 0x10, 0x00, 0x02,
0x09, 0x04, 0x01, 0x00, 0x02, 0xFE, 0x00, 0x00, 0x5E,
0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00,
0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00
};
{bLength: (uint8_t)4,
bDescriptorType: (uint8_t)3,
wLANGID: (uint16_t)1033}
{bLength: (uint8_t)28,
bDescriptorType: (uint8_t)3,
bString: (string16_t)NXP SEMICOND }
{bLength: (uint8_t)36,
bDescriptorType: (uint8_t)3,
bString: (string16_t)NXP LPC13XX CHIP }
{bLength: (uint8_t)26,
bDescriptorType: (uint8_t)3,
bString: (string16_t)DEMO00000000}
{bLength: (uint8_t)10,
bDescriptorType: (uint8_t)3,
bString: (string16_t)CHIP}
{bLength: (uint8_t)18,
bDescriptorType: (uint8_t)3,
bString: (string16_t)COM/DATA}
const uint8_t USB_StringDescriptor[] = {
0x04, 0x03, 0x09, 0x04,
0x1C, 0x03, 'N', '\0', 'X', '\0', 'P', '\0', ' ', '\0', 'S', '\0', 'E', '\0', 'M', '\0', 'I', '\0', 'C', '\0', 'O', '\0', 'N', '\0', 'D', '\0', ' ', '\0',
0x24, 0x03, 'N', '\0', 'X', '\0', 'P', '\0', ' ', '\0', 'L', '\0', 'P', '\0', 'C', '\0', '1', '\0', '3', '\0', 'X', '\0', 'X', '\0', ' ', '\0', 'C', '\0', 'H', '\0', 'I', '\0', 'P', '\0', ' ', '\0',
0x1A, 0x03, 'D', '\0', 'E', '\0', 'M', '\0', 'O', '\0', '0', '\0', '0', '\0', '0', '\0', '0', '\0', '0', '\0', '0', '\0', '0', '\0', '0', '\0',
0x0A, 0x03, 'C', '\0', 'H', '\0', 'I', '\0', 'P', '\0',
0x12, 0x03, 'C', '\0', 'O', '\0', 'M', '\0', '/', '\0', 'D', '\0', 'A', '\0', 'T', '\0', 'A', '\0'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment