将报告大小从64字节增加到256字节自定义USB HID?

时间:2018-12-28 13:42:36

标签: usb stm32 hid

我想通过USB自定义HID接口将256个字节从主机传输到stm32f103设备

当前,64字节的读/写正常工作

以下是我的stm32中的报告描述符:

/ ** USB HID报告描述符。 * /

static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END ={   
 0x06,0x00,0xFF,                        //Usage Page 0xff00
   0x09, 0x01,                  //USAGE (Pointer)
   0xA1,0x01,                   //Collection (application)
      //Input Report
      0x19,0x01,                 //Usage Minimum
      0x29,0x40,                 //Usage Minimum
      0x15,0x00,                 //Logical Minimum
      0x26,0xFF,0x00,            //Logical Minimum
      0x75,0x08,                 //report size : 8-bit field size
      0x95, CUSTOM_HID_EPIN_SIZE,//Report count
      0x81,0x02,                 //Input (data, array, Abs)   
      //Output Report
      0x19,0x01,                 //usage Minimum
      0x29,0x40,                 //usage Minimum
      0x75,0x08,                 //report size : 8-bit field size
      0x95,CUSTOM_HID_EPOUT_SIZE,//Report Count
      0x91,0x02,                 //Output (data, array, Abs)
  0xC0                           //END_COLLECTION              
};

如果我将CUSTOM_HID_EPIN_SIZE,CUSTOM_HID_EPOUT_SIZE更改为256,则无法识别我的USB设备。

我需要一些帮助来修改报告描述符以支持256字节传输

谢谢

0 个答案:

没有答案