Changed over all deprecated GCC structure tag initializers to the standardized C99...
[pub/lufa.git] / Demos / Host / MassStorageHost / MassStoreCommands.c
index 41c59dc..864edf3 100644 (file)
@@ -252,11 +252,11 @@ uint8_t MassStore_ClearPipeStall(const uint8_t EndpointNum)
 {\r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
 {\r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
-                       bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
-                       bRequest:      REQ_ClearFeature,\r
-                       wValue:        FEATURE_ENDPOINT_HALT,\r
-                       wIndex:        EndpointNum,\r
-                       wLength:       0,\r
+                       .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),\r
+                       .bRequest      = REQ_ClearFeature,\r
+                       .wValue        = FEATURE_ENDPOINT_HALT,\r
+                       .wIndex        = EndpointNum,\r
+                       .wLength       = 0,\r
                };\r
        \r
        /* Select the control pipe for the request transfer */\r
                };\r
        \r
        /* Select the control pipe for the request transfer */\r
@@ -274,11 +274,11 @@ uint8_t MassStore_MassStorageReset(void)
 {\r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
 {\r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
-                       bmRequestType: (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
-                       bRequest:      REQ_MassStorageReset,\r
-                       wValue:        0,\r
-                       wIndex:        0,\r
-                       wLength:       0,\r
+                       .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),\r
+                       .bRequest      = REQ_MassStorageReset,\r
+                       .wValue        = 0,\r
+                       .wIndex        = 0,\r
+                       .wLength       = 0,\r
                };\r
        \r
        /* Select the control pipe for the request transfer */\r
                };\r
        \r
        /* Select the control pipe for the request transfer */\r
@@ -300,11 +300,11 @@ uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
 \r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
 \r
        USB_HostRequest = (USB_Host_Request_Header_t)\r
                {\r
-                       bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
-                       bRequest:      REQ_GetMaxLUN,\r
-                       wValue:        0,\r
-                       wIndex:        0,\r
-                       wLength:       1,\r
+                       .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),\r
+                       .bRequest      = REQ_GetMaxLUN,\r
+                       .wValue        = 0,\r
+                       .wIndex        = 0,\r
+                       .wLength       = 1,\r
                };\r
                \r
        /* Select the control pipe for the request transfer */\r
                };\r
                \r
        /* Select the control pipe for the request transfer */\r
@@ -337,17 +337,17 @@ uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_
        /* Create a CBW with a SCSI command to issue REQUEST SENSE command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to issue REQUEST SENSE command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: sizeof(SCSI_Request_Sense_Response_t),\r
-                                       Flags:              COMMAND_DIRECTION_DATA_IN,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  6\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_IN,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 6\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_REQUEST_SENSE,\r
                                        0x00,                   // Reserved\r
                                {\r
                                        SCSI_CMD_REQUEST_SENSE,\r
                                        0x00,                   // Reserved\r
@@ -404,17 +404,17 @@ uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd
        /* Create a CBW with a SCSI command to read in the given blocks from the device */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to read in the given blocks from the device */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: ((uint32_t)Blocks * BlockSize),\r
-                                       Flags:              COMMAND_DIRECTION_DATA_IN,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  10\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_IN,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 10\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_READ_10,\r
                                        0x00,                   // Unused (control bits, all off)\r
                                {\r
                                        SCSI_CMD_READ_10,\r
                                        0x00,                   // Unused (control bits, all off)\r
@@ -475,17 +475,17 @@ uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockA
        /* Create a CBW with a SCSI command to write the given blocks to the device */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to write the given blocks to the device */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: ((uint32_t)Blocks * BlockSize),\r
-                                       Flags:              COMMAND_DIRECTION_DATA_OUT,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  10\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_OUT,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 10\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_WRITE_10,\r
                                        0x00,                   // Unused (control bits, all off)\r
                                {\r
                                        SCSI_CMD_WRITE_10,\r
                                        0x00,                   // Unused (control bits, all off)\r
@@ -534,17 +534,17 @@ uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
        /* Create a CBW with a SCSI command to issue TEST UNIT READY command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to issue TEST UNIT READY command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: 0,\r
-                                       Flags:              COMMAND_DIRECTION_DATA_IN,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  6\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = 0,\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_IN,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 6\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_TEST_UNIT_READY,\r
                                        0x00,                   // Reserved\r
                                {\r
                                        SCSI_CMD_TEST_UNIT_READY,\r
                                        0x00,                   // Reserved\r
@@ -583,17 +583,17 @@ uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
        /* Create a CBW with a SCSI command to issue READ CAPACITY command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to issue READ CAPACITY command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: 8,\r
-                                       Flags:              COMMAND_DIRECTION_DATA_IN,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  10\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = 8,\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_IN,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 10\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_READ_CAPACITY_10,\r
                                        0x00,                   // Reserved\r
                                {\r
                                        SCSI_CMD_READ_CAPACITY_10,\r
                                        0x00,                   // Reserved\r
@@ -655,17 +655,17 @@ uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool P
        /* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
        /* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */\r
        SCSICommandBlock = (CommandBlockWrapper_t)\r
                {\r
-                       Header:\r
+                       .Header =\r
                                {\r
                                {\r
-                                       Signature:          CBW_SIGNATURE,\r
-                                       Tag:                MassStore_Tag,\r
-                                       DataTransferLength: 0,\r
-                                       Flags:              COMMAND_DIRECTION_DATA_OUT,\r
-                                       LUN:                LUNIndex,\r
-                                       SCSICommandLength:  6\r
+                                       .Signature          = CBW_SIGNATURE,\r
+                                       .Tag                = MassStore_Tag,\r
+                                       .DataTransferLength = 0,\r
+                                       .Flags              = COMMAND_DIRECTION_DATA_OUT,\r
+                                       .LUN                = LUNIndex,\r
+                                       .SCSICommandLength  = 6\r
                                },\r
                                        \r
                                },\r
                                        \r
-                       SCSICommandData:\r
+                       .SCSICommandData =\r
                                {\r
                                        SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL,\r
                                        0x00,                   // Reserved\r
                                {\r
                                        SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL,\r
                                        0x00,                   // Reserved\r