Added board hardware driver support for the Arduino Uno development board.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / MassStorage.c
index c31eb86..06ad2c8 100644 (file)
@@ -48,25 +48,22 @@ void MS_Device_ProcessControlRequest(USB_ClassInfo_MS_Device_t* const MSInterfac
 
        switch (USB_ControlRequest.bRequest)
        {
 
        switch (USB_ControlRequest.bRequest)
        {
-               case REQ_MassStorageReset:
+               case MS_REQ_MassStorageReset:
                        if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
                        if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
-
-                               MSInterfaceInfo->State.IsMassStoreReset = true;                 
-
                                Endpoint_ClearStatusStage();
                                Endpoint_ClearStatusStage();
+
+                               MSInterfaceInfo->State.IsMassStoreReset = true;
                        }
 
                        break;
                        }
 
                        break;
-               case REQ_GetMaxLUN:
+               case MS_REQ_GetMaxLUN:
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
                        if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
                        {
                                Endpoint_ClearSETUP();
-
                                Endpoint_Write_Byte(MSInterfaceInfo->Config.TotalLUNs - 1);                             
                                Endpoint_Write_Byte(MSInterfaceInfo->Config.TotalLUNs - 1);                             
-                               Endpoint_ClearIN();
-                               
+                               Endpoint_ClearIN();                             
                                Endpoint_ClearStatusStage();
                        }
                        
                                Endpoint_ClearStatusStage();
                        }
                        
@@ -110,12 +107,12 @@ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
                          Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
                          
                        MSInterfaceInfo->State.CommandStatus.Status = CALLBACK_MS_Device_SCSICommandReceived(MSInterfaceInfo) ?
                          Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
                          
                        MSInterfaceInfo->State.CommandStatus.Status = CALLBACK_MS_Device_SCSICommandReceived(MSInterfaceInfo) ?
-                                                                                        SCSI_Command_Pass : SCSI_Command_Fail;
+                                                                                        MS_SCSI_COMMAND_Pass : MS_SCSI_COMMAND_Fail;
                        MSInterfaceInfo->State.CommandStatus.Signature           = MS_CSW_SIGNATURE;
                        MSInterfaceInfo->State.CommandStatus.Tag                 = MSInterfaceInfo->State.CommandBlock.Tag;
                        MSInterfaceInfo->State.CommandStatus.DataTransferResidue = MSInterfaceInfo->State.CommandBlock.DataTransferLength;
 
                        MSInterfaceInfo->State.CommandStatus.Signature           = MS_CSW_SIGNATURE;
                        MSInterfaceInfo->State.CommandStatus.Tag                 = MSInterfaceInfo->State.CommandBlock.Tag;
                        MSInterfaceInfo->State.CommandStatus.DataTransferResidue = MSInterfaceInfo->State.CommandBlock.DataTransferLength;
 
-                       if ((MSInterfaceInfo->State.CommandStatus.Status == SCSI_Command_Fail) &&
+                       if ((MSInterfaceInfo->State.CommandStatus.Status == MS_SCSI_COMMAND_Fail) &&
                            (MSInterfaceInfo->State.CommandStatus.DataTransferResidue))
                        {
                                Endpoint_StallTransaction();
                            (MSInterfaceInfo->State.CommandStatus.DataTransferResidue))
                        {
                                Endpoint_StallTransaction();