Make HID device class driver reselect the correct endpoint after the user callbacks have fired.
This commit is contained in:
parent
de70f0f1cf
commit
cf610c5c91
5 changed files with 6 additions and 2 deletions
|
@ -56,6 +56,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
|
|||
CALLBACK_HID_Device_CreateHIDReport(HIDInterfaceInfo, &ReportID,
|
||||
HIDInterfaceInfo->Config.PrevReportINBuffer, &ReportINSize);
|
||||
|
||||
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
|
||||
Endpoint_Write_Control_Stream_LE(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportINSize);
|
||||
Endpoint_ClearOUT();
|
||||
}
|
||||
|
@ -167,6 +168,8 @@ void HID_Device_USBTask(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
|
|||
{
|
||||
HIDInterfaceInfo->State.IdleMSRemaining = HIDInterfaceInfo->State.IdleCount;
|
||||
|
||||
Endpoint_SelectEndpoint(HIDInterfaceInfo->Config.ReportINEndpointNumber);
|
||||
|
||||
if (ReportID)
|
||||
Endpoint_Write_Byte(ReportID);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue