HID device with multiple interfaces
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2009-10-27 02:18 PM
Posted on October 27, 2009 at 22:18
HID device with multiple interfaces
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 04:27 AM
Posted on May 17, 2011 at 13:27
Hi,
I am working with the demo board STM32F10X-128K-EVAL. I am making the HID device with multiple intefaces (based on the Custom HID project for the demo board). I changed the usb_desc.c by adding one more interface and also, set up the endpoint 2 ENDP2 for the second interface. When I run the code, only the first interface is enumerated successfully. I dont know what is the problem? Could somebody help? Thanks.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 04:27 AM
Posted on May 17, 2011 at 13:27
Have you changed the decriptors to indicate a composite device?
Chris.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 04:27 AM
Posted on May 17, 2011 at 13:27
Thank you for your replying.
I added one more interface and report descriptor in usb_desc.c. Also, I changed the CustomHID_Data_Setup function like this: RESULT CustomHID_Data_Setup(u8 RequestNo) { u8 *(*CopyRoutine)(u16); CopyRoutine = NULL; if ((RequestNo == GET_DESCRIPTOR) && (Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT)) ) { if (pInformation->USBwValue1 == REPORT_DESCRIPTOR) { if( pInformation->USBwIndex0 == 0 ) { CopyRoutine = CustomHID_GetReportDescriptor; }else if( pInformation->USBwIndex0 == 1 ) { CopyRoutine = RFID_GetReportDescriptor; } } } if (CopyRoutine == NULL) { return USB_UNSUPPORT; } pInformation->Ctrl_Info.CopyData = CopyRoutine; pInformation->Ctrl_Info.Usb_wOffset = 0; (*CopyRoutine)(0); return USB_SUCCESS; } With my code now, the device appears as 2 HID devices with 2 interfaces in PC like this: -HID device -HID device -USB human interface device -USB human interface device I attach a figure for this. Did you experience this problem?Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 04:27 AM
Posted on May 17, 2011 at 13:27
Actually, my code works well. That is a stupid question.
