X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/8f6b4ddf764c3a54e42d00a7502c82c5c3e71b1c..edcfaf7716c978a29ffd082f77587b21bea7a344:/Demos/Device/MassStorage/MassStorage.c diff --git a/Demos/Device/MassStorage/MassStorage.c b/Demos/Device/MassStorage/MassStorage.c index 48ce5f34d..e2c242499 100644 --- a/Demos/Device/MassStorage/MassStorage.c +++ b/Demos/Device/MassStorage/MassStorage.c @@ -40,7 +40,7 @@ /* Scheduler Task List */ TASK_LIST { - { Task: USB_MassStorage , TaskStatus: TASK_STOP }, + { .Task = USB_MassStorage , .TaskStatus = TASK_STOP }, }; /* Global Variables */ @@ -48,7 +48,7 @@ TASK_LIST CommandBlockWrapper_t CommandBlock; /** Structure to hold the latest Command Status Wrapper to return to the host, containing the status of the last issued command. */ -CommandStatusWrapper_t CommandStatus = { Signature: CSW_SIGNATURE }; +CommandStatusWrapper_t CommandStatus = { .Signature = CSW_SIGNATURE }; /** Flag to asynchronously abort any in-progress data transfers upon the reception of a mass storage reset command. */ volatile bool IsMassStoreReset = false; @@ -148,35 +148,35 @@ EVENT_HANDLER(USB_ConfigurationChanged) EVENT_HANDLER(USB_UnhandledControlPacket) { /* Process UFI specific control requests */ - switch (bRequest) + switch (USB_ControlRequest.bRequest) { case REQ_MassStorageReset: - if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) + if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) { - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Indicate that the current transfer should be aborted */ IsMassStoreReset = true; /* Acknowledge status stage */ while (!(Endpoint_IsINReady())); - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); } break; case REQ_GetMaxLUN: - if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) + if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE)) { - Endpoint_ClearControlSETUP(); + Endpoint_ClearSETUP(); /* Indicate to the host the number of supported LUNs (virtual disks) on the device */ Endpoint_Write_Byte(TOTAL_LUNS - 1); - Endpoint_ClearControlIN(); + Endpoint_ClearIN(); /* Acknowledge status stage */ while (!(Endpoint_IsOUTReceived())); - Endpoint_ClearControlOUT(); + Endpoint_ClearOUT(); } break;