aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/MassStorageHost/Lib
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-18 07:53:51 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-18 07:53:51 +0000
commite338cb6f329d6bf948abad88637f81436ee90daf (patch)
tree8363f304c09248929a65f9c3e029340d1dc960b1 /Demos/Host/LowLevel/MassStorageHost/Lib
parent2b21a1552d1a5b107120f4ac2e9ac357c999cc34 (diff)
downloadlufa-e338cb6f329d6bf948abad88637f81436ee90daf.tar.gz
lufa-e338cb6f329d6bf948abad88637f81436ee90daf.tar.bz2
lufa-e338cb6f329d6bf948abad88637f81436ee90daf.zip
Added new USB_Host_ClearPipeStall() convenience function to clear a stall condition on an attached device's endpoint.
Added new USB_Host_GetDeviceDescriptor() convenience function to retrieve the attached device's Device descriptor. Make Pipe_ConfigurePipe() mask the given endpoint number against PIPE_EPNUM_MASK to ensure the endpoint IN direction bit is cleared to prevent endpoint type corruption. Fix documentation mentioning Pipe_GetCurrentToken() function when real name is Pipe_GetPipeToken().
Diffstat (limited to 'Demos/Host/LowLevel/MassStorageHost/Lib')
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c27
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h1
2 files changed, 2 insertions, 26 deletions
diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
index afeace02f..c524b5387 100644
--- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
+++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
@@ -134,7 +134,7 @@ static uint8_t MassStore_WaitForDataReceived(void)
if (Pipe_IsStalled())
{
/* Clear the stall condition on the OUT pipe */
- MassStore_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);
+ USB_Host_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);
return PIPE_RWSTREAM_PipeStalled;
}
@@ -147,7 +147,7 @@ static uint8_t MassStore_WaitForDataReceived(void)
if (Pipe_IsStalled())
{
/* Clear the stall condition on the IN pipe */
- MassStore_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);
+ USB_Host_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);
return PIPE_RWSTREAM_PipeStalled;
}
@@ -243,29 +243,6 @@ static uint8_t MassStore_GetReturnedStatus(void)
return PIPE_RWSTREAM_NoError;
}
-/** Clears the stall condition in the attached device on the nominated endpoint number.
- *
- * \param EndpointNum Endpoint number in the attached device whose stall condition is to be cleared
- *
- * \return A value from the USB_Host_SendControlErrorCodes_t enum
- */
-uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)
-{
- USB_ControlRequest = (USB_Request_Header_t)
- {
- .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
- .bRequest = REQ_ClearFeature,
- .wValue = FEATURE_ENDPOINT_HALT,
- .wIndex = EndpointNum,
- .wLength = 0,
- };
-
- /* Select the control pipe for the request transfer */
- Pipe_SelectPipe(PIPE_CONTROLPIPE);
-
- return USB_Host_SendControlRequest(NULL);
-}
-
/** Issues a Mass Storage class specific request to reset the attached device's Mass Storage interface,
* readying the device for the next CBW.
*
diff --git a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h
index e939f1c86..78700de84 100644
--- a/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h
+++ b/Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h
@@ -158,7 +158,6 @@
static uint8_t MassStore_GetReturnedStatus(void);
#endif
- uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum);
uint8_t MassStore_MassStorageReset(void);
uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex);
uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_Response_t* const SensePtr)