aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host')
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.c4
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.h1
-rw-r--r--Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c14
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c27
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.h1
5 files changed, 6 insertions, 41 deletions
diff --git a/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.c b/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.c
index afeace02f..75974732c 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.c
+++ b/Demos/Host/ClassDriver/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;
}
diff --git a/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.h b/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.h
index e939f1c86..78700de84 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/Lib/MassStoreCommands.h
+++ b/Demos/Host/ClassDriver/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)
diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
index b7d49f609..1aaa8141e 100644
--- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
+++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c
@@ -144,22 +144,12 @@ void Bluetooth_Management_Task(void)
}
puts_P(PSTR("Bluetooth Dongle Detected.\r\n"));
-
- /* Standard request to set the device configuration to configuration 1 */
- USB_ControlRequest = (USB_Request_Header_t)
- {
- bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
- bRequest: REQ_SetConfiguration,
- wValue: 1,
- wIndex: 0,
- wLength: 0,
- };
/* Select the control pipe for the request transfer */
Pipe_SelectPipe(PIPE_CONTROLPIPE);
- /* Send the request, display error and wait for device detatch if request fails */
- if ((ErrorCode = USB_Host_SendControlRequest(NULL)) != HOST_SENDCONTROL_Successful)
+ /* Set the device configuration to the first configuration (rarely do devices use multiple configurations) */
+ if ((ErrorCode = USB_Host_SetDeviceConfiguration(1)) != HOST_SENDCONTROL_Successful)
{
puts_P(PSTR("Control Error (Set Configuration).\r\n"));
printf_P(PSTR(" -- Error Code: %d\r\n"), ErrorCode);
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)