__ALIGN_BEGIN static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END =
{
/* USER CODE BEGIN 0 */
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x00, // USAGE (Undefined)
0xa1, 0x01, // COLLECTION (Application)
0x09, 0x00, // USAGE (Undefined)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x95, 0x40, // REPORT_COUNT (64)
0x75, 0x08, // REPORT_SIZE (8)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x09, 0x00, // USAGE (Undefined)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x95, 0x40, // REPORT_COUNT (64)
0x75, 0x08, // REPORT_SIZE (8)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
/* USER CODE END 0 */
0xC0 /* END_COLLECTION */
};
/* USB CUSTOM_HID device FS Configuration Descriptor */
__ALIGN_BEGIN static uint8_t USBD_CUSTOM_HID_CfgFSDesc[USB_CUSTOM_HID_CONFIG_DESC_SIZ] __ALIGN_END =
{
0x09, /* bLength: Configuration Descriptor size */
USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType: Configuration */
USB_CUSTOM_HID_CONFIG_DESC_SIZ,
/* wTotalLength: Bytes returned */
0x00,
0x02,//1 /*bNumInterfaces: 2 interface*/
0x01, /*bConfigurationValue: Configuration value*/
0x00, /*iConfiguration: Index of string descriptor describing
the configuration*/
0xC0, /*bmAttributes: bus powered */
0x32, /*MaxPower 100 mA: this current is used for detecting Vbus*/
/******************* Standard AC Interface Descriptor *********************/
/* 09 */
0x09, /*bLength: Interface Descriptor size*/
USB_DESC_TYPE_INTERFACE, /*bDescriptorType: Interface descriptor type*/
0x00, /*bInterfaceNumber: Number of Interface*/
0x00, /*bAlternateSetting: Alternate setting*/
0x00, /*bNumEndpoints*/
0x01, /*bInterfaceClass: Audio*/
0x01, /*bInterfaceSubClass : Audio Control*/
0, /*nInterfaceProtocol*/
0, /*iInterface: Index of string descriptor*/
/**************** Class-specific AC Interface Descriptor ******************/
/* 18 */
0x09, /*bLength: Interface Descriptor size*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x01, /*bDescriptorSubType: Header*/
0x00, /*bcdADC: Revision of class specification - 1.0*/
0x01,
0x09, /*wTotalLength: Total size of class specific discriptor*/
0x00,
0x01, /*bInCollection: Number of streaming interfaces*/
0x01, /*baInterfaceNr : MIDIStreaming interface 1 belongs to
this AudioControl interface*/
/******************* Standard MS Interface Descriptor *********************/
/* 27 */
0x09, /*bLength: Interface Descriptor size*/
USB_DESC_TYPE_INTERFACE, /*bDescriptorType: Interface descriptor type*/
0x01, /*bInterfaceNumber: Number of Interface*/
0x00, /*bAlternateSetting: Alternate setting*/
0x02, /*bNumEndpoints*/
0x01, /*bInterfaceClass: Audio*/
0x03, /*bInterfaceSubClass : MIDI Streaming*/
0, /*nInterfaceProtocol*/
0, /*iInterface: Index of string descriptor*/
/**************** Class-specific MS Interface Descriptor ******************/
/* 36 */
0x07, /*bLength: Interface Descriptor size*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x01, /*bDescriptorSubType: MS Header*/
0x00, /*bcdADC: Revision of class specification*/
0x01,
0x41, /*wTotalLength: Total size of class specific discriptor*/
0x00,
/******************* MIDI IN Jack Descriptor (Embedded) *******************/
/* 43 */
0x06, /*bLength: Size of this descriptor*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x02, /*bDescriptorSubType: MIDI IN Jack*/
0x01, /*bJackType: Embedded*/
0x01, /*bJackID: ID of this Jack*/
0x00, /*iJack*/
/******************* MIDI IN Jack Descriptor (External) *******************/
/* 49 */
0x06, /*bLength: Size of this descriptor*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x02, /*bDescriptorSubType: MIDI IN Jack*/
0x02, /*bJackType: External*/
0x02, /*bJackID: ID of this Jack*/
0x00, /*iJack*/
/******************* MIDI OUT Jack Descriptor (Embedded) ******************/
/* 55 */
0x09, /*bLength: Size of this descriptor*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x03, /*bDescriptorSubType: MIDI OUT Jack*/
0x01, /*bJackType: Embedded*/
0x03, /*bJackID: ID of this Jack*/
0x01, /*bNrInputPins: Number of Input Pins of this Jack*/
0x02, /*BaSourceID: ID of the Entry to which this Pin is connected*/
0x01, /*BaSourceID: Output Pin number of the Entry to
which this Input Pin is connected*/
0x00, /*iJack*/
/******************* MIDI OUT Jack Descriptor (External) ******************/
/* 64 */
0x09, /*bLength: Size of this descriptor*/
0x24, /*bDescriptorType: Class-specific interface descriptor type*/
0x03, /*bDescriptorSubType: MIDI OUT Jack*/
0x02, /*bJackType: External*/
0x04, /*bJackID: ID of this Jack*/
0x01, /*bNrInputPins: Number of Input Pins of this Jack*/
0x01, /*BaSourceID: ID of the Entry to which this Pin is connected*/
0x01, /*BaSourceID: Output Pin number of the Entry to
which this Input Pin is connected*/
0x00, /*iJack*/
/****************** Standard Bulk OUT Endpoint Descriptor *****************/
/* 73 端点用于接收数据*/
0x09, /*bLength: Size of this descriptor*/
USB_DESC_TYPE_ENDPOINT, /*bDescriptorType: Endpoint descriptor type*/
CUSTOM_HID_EPOUT_ADDR, /*bEndpointAddress: OUT Endpoint 1*/
0x02, /*bmAttributes: Bulk, not shared.*/
CUSTOM_HID_EPOUT_SIZE, /*wMaxPacketSize 64*/
0x00,
CUSTOM_HID_FS_BINTERVAL, /*bInterval*/
0x00, /*bRefresh*/
0x00, /*bSynchAddress*/
/************* Class-specific MS Bulk OUT Endpoint Descriptor *************/
/* 82 */
0x05, /*bLength: Size of this descriptor*/
0x25, /*bDescriptorType: Class-specific endpoint descriptor type*/
0x01, /*bDescriptorSubType: MS General*/
0x01, /*bNumEmbMIDIJack: Number of embedded MIDI IN Jack*/
0x01, /*BaAssocJackID: ID of the Embedded MIDI IN Jack*/
/****************** Standard Bulk IN Endpoint Descriptor *****************/
/* 87 */
0x09, /*bLength: Size of this descriptor*/
USB_DESC_TYPE_ENDPOINT, /*bDescriptorType: Endpoint descriptor type*/
CUSTOM_HID_EPIN_ADDR, /*bEndpointAddress: IN Endpoint 1*/
0x02, /*bmAttributes: Bulk, not shared.*/
CUSTOM_HID_EPIN_SIZE, /*wMaxPacketSize 64*/
0x00,
CUSTOM_HID_FS_BINTERVAL, /*bInterval*/
0x00, /*bRefresh*/
0x00, /*bSynchAddress*/
/************* Class-specific MS Bulk OUT Endpoint Descriptor *************/
/* 96 */
0x05, /*bLength: Size of this descriptor*/
0x25, /*bDescriptorType: Class-specific endpoint descriptor type*/
0x01, /*bDescriptorSubType: MS General*/
0x01, /*bNumEmbMIDIJack: Number of embedded MIDI OUT Jack*/
0x03, /*BaAssocJackID: ID of the Embedded MIDI OUT Jack*/
/* 101 */
};