X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/d860e9e842c05e759214f5170f78783decae9956..f11f69fd2989899b3088ea7d11b981f2d68c05e0:/Demos/Device/KeyboardMouse/KeyboardMouse.c 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);