aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/MassStorageHost
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/MassStorageHost')
-rw-r--r--Demos/Host/MassStorageHost/MassStorageHost.c3
-rw-r--r--Demos/Host/MassStorageHost/MassStoreCommands.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/Demos/Host/MassStorageHost/MassStorageHost.c b/Demos/Host/MassStorageHost/MassStorageHost.c
index a7b550ca7..ec5bc6107 100644
--- a/Demos/Host/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/MassStorageHost/MassStorageHost.c
@@ -170,6 +170,9 @@ TASK(USB_MassStore_Host)
wLength: 0,
};
+ /* Select the control pipe for the request transfer */
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
/* Send the request, display error and wait for device detach if request fails */
if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
{
diff --git a/Demos/Host/MassStorageHost/MassStoreCommands.c b/Demos/Host/MassStorageHost/MassStoreCommands.c
index 0d88acbd5..bf736e79c 100644
--- a/Demos/Host/MassStorageHost/MassStoreCommands.c
+++ b/Demos/Host/MassStorageHost/MassStoreCommands.c
@@ -256,6 +256,9 @@ uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)
wLength: 0,
};
+ /* Select the control pipe for the request transfer */
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
return USB_Host_SendControlRequest(NULL);
}
@@ -275,6 +278,9 @@ uint8_t MassStore_MassStorageReset(void)
wLength: 0,
};
+ /* Select the control pipe for the request transfer */
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
return USB_Host_SendControlRequest(NULL);
}
@@ -298,6 +304,9 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
wLength: 1,
};
+ /* Select the control pipe for the request transfer */
+ Pipe_SelectPipe(PIPE_CONTROLPIPE);
+
if ((ErrorCode = USB_Host_SendControlRequest(MaxLUNIndex)) == HOST_SENDCONTROL_SetupStalled)
{
/* Clear the pipe stall */