diff options
Diffstat (limited to 'Demos/Device/KeyboardMouse')
-rw-r--r-- | Demos/Device/KeyboardMouse/KeyboardMouse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/KeyboardMouse/KeyboardMouse.c b/Demos/Device/KeyboardMouse/KeyboardMouse.c index a85a3786d..dc039eec0 100644 --- a/Demos/Device/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/KeyboardMouse/KeyboardMouse.c @@ -144,6 +144,8 @@ EVENT_HANDLER(USB_UnhandledControlPacket) case REQ_GetReport:
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
{
+ Endpoint_ClearSETUP();
+
/* Determine if it is the mouse or the keyboard data that is being requested */
if (!(USB_ControlRequest.wIndex))
{
@@ -156,8 +158,6 @@ EVENT_HANDLER(USB_UnhandledControlPacket) ReportSize = sizeof(MouseReportData);
}
- Endpoint_ClearSETUP();
-
/* Write the report data to the control endpoint */
Endpoint_Write_Control_Stream_LE(ReportData, ReportSize);
|