diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-01-10 18:56:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-01-10 18:56:34 +0000 |
commit | 154f934b227dd665cd4a6393453601c5c400d78c (patch) | |
tree | cd40b901c2efd71ef767fb7bdd9b0477f9dc6eb1 | |
parent | f555ad7ced743a19eb1eefaf5eaf536fcbe58d80 (diff) | |
download | lufa-154f934b227dd665cd4a6393453601c5c400d78c.tar.gz lufa-154f934b227dd665cd4a6393453601c5c400d78c.tar.bz2 lufa-154f934b227dd665cd4a6393453601c5c400d78c.zip |
Call USB_USBTask() in the Endpoint stream functions between packets if INTERRUPT_CONTROL_ENDPOINT is not set. Remove calls to USB_USBTask in the Mass Storage class driver stream read/write continuation checks, since this is now done inside the stream function.
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/MassStorage.c | 12 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/PipeStream.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Endpoint.c | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Pipe.c | 4 |
5 files changed, 6 insertions, 20 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c index 18f7b8e52..4d7cff6bf 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c @@ -166,10 +166,6 @@ static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte (sizeof(MS_CommandBlockWrapper_t) - 16), &BytesProcessed) == ENDPOINT_RWSTREAM_IncompleteTransfer) { - #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); - #endif - if (MSInterfaceInfo->State.IsMassStoreReset) return false; } @@ -192,10 +188,6 @@ static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInte MSInterfaceInfo->State.CommandBlock.SCSICommandLength, &BytesProcessed) == ENDPOINT_RWSTREAM_IncompleteTransfer) { - #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); - #endif - if (MSInterfaceInfo->State.IsMassStoreReset) return false; } @@ -236,10 +228,6 @@ static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInt sizeof(MS_CommandStatusWrapper_t), &BytesProcessed) == ENDPOINT_RWSTREAM_IncompleteTransfer) { - #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); - #endif - if (MSInterfaceInfo->State.IsMassStoreReset) return; } diff --git a/LUFA/Drivers/USB/HighLevel/PipeStream.c b/LUFA/Drivers/USB/HighLevel/PipeStream.c index 9f8898177..4465471a8 100644 --- a/LUFA/Drivers/USB/HighLevel/PipeStream.c +++ b/LUFA/Drivers/USB/HighLevel/PipeStream.c @@ -101,6 +101,8 @@ uint8_t Pipe_Null_Stream(uint16_t Length, *BytesProcessed += BytesInTransfer;
return PIPE_RWSTREAM_IncompleteTransfer;
}
+
+ USB_USBTask();
if ((ErrorCode = Pipe_WaitUntilReady()))
return ErrorCode;
diff --git a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c index 8a68d65e2..4077279cd 100644 --- a/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c +++ b/LUFA/Drivers/USB/HighLevel/Template/Template_Endpoint_RW.c @@ -27,6 +27,10 @@ uint8_t TEMPLATE_FUNC_NAME (TEMPLATE_BUFFER_TYPE Buffer, return ENDPOINT_RWSTREAM_IncompleteTransfer; } + #if !defined(INTERRUPT_CONTROL_ENDPOINT) + USB_USBTask(); + #endif + if ((ErrorCode = Endpoint_WaitUntilReady())) return ErrorCode; } diff --git a/LUFA/Drivers/USB/LowLevel/Endpoint.c b/LUFA/Drivers/USB/LowLevel/Endpoint.c index df1e86aa7..33f5ec924 100644 --- a/LUFA/Drivers/USB/LowLevel/Endpoint.c +++ b/LUFA/Drivers/USB/LowLevel/Endpoint.c @@ -155,10 +155,6 @@ uint8_t Endpoint_WaitUntilReady(void) if (Endpoint_IsOUTReceived()) return ENDPOINT_READYWAIT_NoError; } - - #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); - #endif uint8_t USB_DeviceState_LCL = USB_DeviceState; diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c index e8ee23ffd..82a9c1a49 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.c +++ b/LUFA/Drivers/USB/LowLevel/Pipe.c @@ -172,10 +172,6 @@ uint8_t Pipe_WaitUntilReady(void) return PIPE_READYWAIT_NoError; } - #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); - #endif - if (Pipe_IsStalled()) return PIPE_READYWAIT_PipeStalled; else if (USB_HostState == HOST_STATE_Unattached) |