const
uint8_t CustomHID_DeviceDescriptor[CUSTOMHID_SIZ_DEVICE_DESC] =
{
0x12,
/*bLength
*/
USB_DEVICE_DESCRIPTOR_TYPE,
/*bDescriptorType*/
0x00,
/*bcdUSB
*/
0x02,
0x00,
/*bDeviceClass*/
0x00,
/*bDeviceSubClass*/
0x00,
/*bDeviceProtocol*/
0x40,
/*bMaxPacketSize40*/
LOBYTE(USBD_VID),
/*idVendor*/
HIBYTE(USBD_VID),
/*idVendor*/
LOBYTE(USBD_PID),
/*idVendor*/
HIBYTE(USBD_PID),
/*idVendor*/
0x00,
/*bcdDevice
rel. 2.00*/
0x02,
1,
/*Index
of string descriptor describing manufacturer */
2,
/*Index
of string descriptor describing product*/
3,
/*Index
of string descriptor describing the device serial number */
0x01
/*bNumConfigurations*/
};
/*
CustomHID_DeviceDescriptor */
const
uint8_t CustomHID_ConfigDescriptor[CUSTOMHID_SIZ_CONFIG_DESC] =
{
0x09,
/*
bLength: Configuation Descriptor size */
USB_CONFIGURATION_DESCRIPTOR_TYPE,
/*
bDescriptorType: Configuration */
CUSTOMHID_SIZ_CONFIG_DESC,
/*
wTotalLength: Bytes returned */
0x00,
0x01,
/*
bNumInterfaces: 1 interface */
0x01,
/*
bConfigurationValue: Configuration value */
0x00,
/*
iConfiguration: Index of string descriptor describing
the
configuration*/
0xE0,
/*
bmAttributes: Bus powered */
/*Bus
powered: 7th bit, Self Powered: 6th bit, Remote wakeup: 5th bit, reserved: 4..0 bits */
0xFA,
/*
MaxPower 500 mA: this current is used for detecting Vbus */
/**************
Descriptor of Custom HID interface ****************/
/*
09 */
0x09,
/*
bLength: Interface Descriptor size */
USB_INTERFACE_DESCRIPTOR_TYPE,
/*
bDescriptorType: Interface descriptor type */
0x00,