X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/9cec85bfd92a77a97e7d12625897de2682dfacd7..c20a94a4e84c89debf5e7109482ede708a694a0c:/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);