aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Device/HID.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-09-24 06:34:43 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-09-24 06:34:43 +0000
commitb48095c0fbd9774413702b0226ef72926034e6c6 (patch)
treeed4b1e860bd4fdce63d307c8a9631a1083c978d6 /LUFA/Drivers/USB/Class/Device/HID.c
parent5f3c4cc6e044bdfd4c35b5e27a2841b961766843 (diff)
downloadlufa-b48095c0fbd9774413702b0226ef72926034e6c6.tar.gz
lufa-b48095c0fbd9774413702b0226ef72926034e6c6.tar.bz2
lufa-b48095c0fbd9774413702b0226ef72926034e6c6.zip
Fixed endpoint selection within the CALLBACK_HID_Device_CreateHIDReport() callback function causing broken GET REPORT requests.
Minor whitespace fixes.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Device/HID.c')
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c
index e38d35a5a..1953d9fbc 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.c
+++ b/LUFA/Drivers/USB/Class/Device/HID.c
@@ -60,8 +60,9 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
if (HIDInterfaceInfo->Config.PrevReportINBuffer != NULL)
memcpy(HIDInterfaceInfo->Config.PrevReportINBuffer, ReportData, HIDInterfaceInfo->Config.PrevReportINBufferSize);
- Endpoint_ClearSETUP();
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
+
+ Endpoint_ClearSETUP();
Endpoint_Write_Control_Stream_LE(ReportData, ReportSize);
Endpoint_ClearOUT();
}
@@ -77,7 +78,7 @@ void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInter
Endpoint_ClearSETUP();
Endpoint_Read_Control_Stream_LE(ReportData, ReportSize);
- Endpoint_ClearIN();
+ Endpoint_ClearIN();
CALLBACK_HID_Device_ProcessHIDReport(HIDInterfaceInfo, ReportID, ReportType, ReportData, ReportSize);
}