diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-10-26 05:27:59 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-10-26 05:27:59 +0000 |
commit | cf610c5c91c3eee02dec7ca848acc8da831ad98a (patch) | |
tree | 1410f070fe7c32319b58e2e9c3c5d6b1dae7fde1 /LUFA/Drivers/USB/Class/Device | |
parent | de70f0f1cf034d8f22141a2825f24ad60d14421b (diff) | |
download | lufa-cf610c5c91c3eee02dec7ca848acc8da831ad98a.tar.gz lufa-cf610c5c91c3eee02dec7ca848acc8da831ad98a.tar.bz2 lufa-cf610c5c91c3eee02dec7ca848acc8da831ad98a.zip |
Make HID device class driver reselect the correct endpoint after the user callbacks have fired.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device')
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/HID.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c index a99c2647c..403d494dc 100644 --- a/LUFA/Drivers/USB/Class/Device/HID.c +++ b/LUFA/Drivers/USB/Class/Device/HID.c @@ -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);
|