- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The example code for HID at FX2
The loading of the HID and report descriptors is handled in the DR_GetDescriptor() function
case GD_REPORT://Report Descriptor
switch (SETUPDAT[4]){
case GD_IF0:
HID1length = pHID1ReportDscrEnd -pHID1ReportDscr;
AUTOPTR1H = MSB(pHID1ReportDscr);
AUTOPTR1L = LSB(pHID1ReportDscr);
for(i=0;i<HID1length;i++)
EP0BUF[i]=XAUTODAT1;
EP0BCL = HID1length;
break;
case GD_IF1:HID2
length = pHID2ReportDscrEnd -pHID2ReportDscr;
AUTOPTR1H = MSB(pHID2ReportDscr);
AUTOPTR1L = LSB(pHID2ReportDscr);
for(i=0;i<HID2length;i++)
EP0BUF[i]=XAUTODAT1;
EP0BCL = HID2length;
break;
default:
EZUSB_STALL_EP0();
}
If the HID dexcription length more than 64byte, how to do here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The HID descriptor length is restricted from the USB data communication rate. For full speed, it has to be 64 bytes. This is because interrupt endpoints cannot go beyond over 64 bytes in Full-speed.
Please refer to Appendix E: https://www.usb.org/sites/default/files/hid1_11.pdf
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The HID descriptor length is restricted from the USB data communication rate. For full speed, it has to be 64 bytes. This is because interrupt endpoints cannot go beyond over 64 bytes in Full-speed.
Please refer to Appendix E: https://www.usb.org/sites/default/files/hid1_11.pdf
Regards,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
So you mean the description just under 64 byte, it can't split data to send.
For the Keyboard's description or some complex device the device's descriptor maybe more than 64byte at full speed, how do they work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In that case, the report should split into 64 bytes packets over the IN/OUT endpoint ( chunks of 64 bytes).
Please check the example descriptors in Appendix E: https://www.usb.org/sites/default/files/hid1_11.pdf