The USB_Host_SendControlRequest() function no longer automatically selects the Contro...
[pub/USBasp.git] / Demos / Host / MassStorageHost / MassStoreCommands.c
index 0d88acb..bf736e7 100644 (file)
@@ -256,6 +256,9 @@ uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)
                        wLength:       0,\r
                };\r
        \r
+       /* Select the control pipe for the request transfer */\r
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
        return USB_Host_SendControlRequest(NULL);\r
 }\r
 \r
@@ -275,6 +278,9 @@ uint8_t MassStore_MassStorageReset(void)
                        wLength:       0,\r
                };\r
        \r
+       /* Select the control pipe for the request transfer */\r
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
        return USB_Host_SendControlRequest(NULL);\r
 }\r
 \r
@@ -298,6 +304,9 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
                        wLength:       1,\r
                };\r
                \r
+       /* Select the control pipe for the request transfer */\r
+       Pipe_SelectPipe(PIPE_CONTROLPIPE);\r
+\r
        if ((ErrorCode = USB_Host_SendControlRequest(MaxLUNIndex)) == HOST_SENDCONTROL_SetupStalled)\r
        {\r
                /* Clear the pipe stall */\r