The USB_Host_SendControlRequest() function no longer automatically selects the Contro...
[pub/USBasp.git] / Demos / Host / GenericHIDHost / GenericHIDHost.c
index 605fc6f..4d2fefb 100644 (file)
@@ -262,6 +262,9 @@ void WriteNextReport(uint8_t* ReportOUTData, uint16_t ReportLength)
                                wLength:       ReportLength,\r
                        };\r
 \r
+               /* Select the control pipe for the request transfer */\r
+               Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
                /* Send the request to the device */\r
                USB_Host_SendControlRequest(ReportOUTData);\r
        }\r
@@ -288,6 +291,9 @@ TASK(USB_HID_Host)
                                        wLength:       0,\r
                                };\r
 \r
+                       /* Select the control pipe for the request transfer */\r
+                       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
                        /* Send the request, display error and wait for device detach if request fails */\r
                        if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)\r
                        {\r