Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition...
[pub/lufa.git] / Demos / Host / LowLevel / MassStorageHost / Lib / MassStoreCommands.c
index afeace0..c524b53 100644 (file)
@@ -134,7 +134,7 @@ static uint8_t MassStore_WaitForDataReceived(void)
                if (Pipe_IsStalled())\r
                {\r
                        /* Clear the stall condition on the OUT pipe */\r
-                       MassStore_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);\r
+                       USB_Host_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);\r
 \r
                        return PIPE_RWSTREAM_PipeStalled;\r
                }\r
@@ -147,7 +147,7 @@ static uint8_t MassStore_WaitForDataReceived(void)
                if (Pipe_IsStalled())\r
                {\r
                        /* Clear the stall condition on the IN pipe */\r
-                       MassStore_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);\r
+                       USB_Host_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);\r
 \r
                        return PIPE_RWSTREAM_PipeStalled;\r
                }\r
@@ -243,29 +243,6 @@ static uint8_t MassStore_GetReturnedStatus(void)
        return PIPE_RWSTREAM_NoError;\r
 }\r
 \r
-/** Clears the stall condition in the attached device on the nominated endpoint number.\r
- *\r
- *  \param EndpointNum  Endpoint number in the attached device whose stall condition is to be cleared\r
- *\r
- *  \return A value from the USB_Host_SendControlErrorCodes_t enum\r
- */\r
-uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)\r
-{\r
-       USB_ControlRequest = (USB_Request_Header_t)\r
-               {\r
-                       .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
-                       .bRequest      = REQ_ClearFeature,\r
-                       .wValue        = FEATURE_ENDPOINT_HALT,\r
-                       .wIndex        = EndpointNum,\r
-                       .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
 /** Issues a Mass Storage class specific request to reset the attached device's Mass Storage interface,\r
  *  readying the device for the next CBW.\r
  *\r