The USB_Host_SendControlRequest() function no longer automatically selects the Contro...
[pub/USBasp.git] / Demos / Host / KeyboardHost / KeyboardHost.c
index f73e568..947f232 100644 (file)
@@ -263,6 +263,9 @@ TASK(USB_Keyboard_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
@@ -310,6 +313,9 @@ TASK(USB_Keyboard_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