Endpoint_ResetFIFO() renamed to Endpoint_ResetEndpoint(), to be consistent with the...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / MassStorage.c
index 18f7b8e..a3dcb1c 100644 (file)
@@ -29,7 +29,8 @@
 */
 
 #define  __INCLUDE_FROM_USB_DRIVER
-#include "../../HighLevel/USBMode.h"
+#include "../../Core/USBMode.h"
+
 #if defined(USB_CAN_BE_DEVICE)
 
 #define  __INCLUDE_FROM_MS_DRIVER
@@ -141,8 +142,8 @@ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
 
        if (MSInterfaceInfo->State.IsMassStoreReset)
        {
-               Endpoint_ResetFIFO(MSInterfaceInfo->Config.DataOUTEndpointNumber);
-               Endpoint_ResetFIFO(MSInterfaceInfo->Config.DataINEndpointNumber);
+               Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
+               Endpoint_ResetEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
 
                Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataOUTEndpointNumber);
                Endpoint_ClearStall();
@@ -166,10 +167,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 +189,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 +229,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;
        }