Fix build errors in host demos due to usage of pipe error codes which have now been...
[pub/lufa.git] / Demos / Device / MassStorage / MassStorage.c
index 48ce5f3..e2c2424 100644 (file)
@@ -40,7 +40,7 @@
 /* Scheduler Task List */\r
 TASK_LIST\r
 {\r
-       { Task: USB_MassStorage      , TaskStatus: TASK_STOP },\r
+       { .Task = USB_MassStorage      , .TaskStatus = TASK_STOP },\r
 };\r
 \r
 /* Global Variables */\r
@@ -48,7 +48,7 @@ TASK_LIST
 CommandBlockWrapper_t  CommandBlock;\r
 \r
 /** Structure to hold the latest Command Status Wrapper to return to the host, containing the status of the last issued command. */\r
-CommandStatusWrapper_t CommandStatus = { Signature: CSW_SIGNATURE };\r
+CommandStatusWrapper_t CommandStatus = { .Signature = CSW_SIGNATURE };\r
 \r
 /** Flag to asynchronously abort any in-progress data transfers upon the reception of a mass storage reset command. */\r
 volatile bool          IsMassStoreReset = false;\r
@@ -148,35 +148,35 @@ EVENT_HANDLER(USB_ConfigurationChanged)
 EVENT_HANDLER(USB_UnhandledControlPacket)\r
 {\r
        /* Process UFI specific control requests */\r
-       switch (bRequest)\r
+       switch (USB_ControlRequest.bRequest)\r
        {\r
                case REQ_MassStorageReset:\r
-                       if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
                        {\r
-                               Endpoint_ClearControlSETUP();\r
+                               Endpoint_ClearSETUP();\r
 \r
                                /* Indicate that the current transfer should be aborted */\r
                                IsMassStoreReset = true;                        \r
 \r
                                /* Acknowledge status stage */\r
                                while (!(Endpoint_IsINReady()));\r
-                               Endpoint_ClearControlIN();\r
+                               Endpoint_ClearIN();\r
                        }\r
 \r
                        break;\r
                case REQ_GetMaxLUN:\r
-                       if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
+                       if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
                        {\r
-                               Endpoint_ClearControlSETUP();\r
+                               Endpoint_ClearSETUP();\r
 \r
                                /* Indicate to the host the number of supported LUNs (virtual disks) on the device */\r
                                Endpoint_Write_Byte(TOTAL_LUNS - 1);\r
                                \r
-                               Endpoint_ClearControlIN();\r
+                               Endpoint_ClearIN();\r
                                \r
                                /* Acknowledge status stage */\r
                                while (!(Endpoint_IsOUTReceived()));\r
-                               Endpoint_ClearControlOUT();\r
+                               Endpoint_ClearOUT();\r
                        }\r
                        \r
                        break;\r