34 #define __INCLUDE_FROM_USB_DRIVER
35 #include "../../Core/USBMode.h"
37 #if defined(USB_CAN_BE_HOST)
39 #define __INCLUDE_FROM_MS_DRIVER
40 #define __INCLUDE_FROM_MASSSTORAGE_HOST_C
44 uint16_t ConfigDescriptorSize,
45 void* ConfigDescriptorData)
52 memset(&MSInterfaceInfo->
State, 0x00,
sizeof(MSInterfaceInfo->
State));
57 while (!(DataINEndpoint) || !(DataOUTEndpoint))
59 if (!(MassStorageInterface) ||
71 DataINEndpoint =
NULL;
72 DataOUTEndpoint =
NULL;
80 DataINEndpoint = EndpointData;
82 DataOUTEndpoint = EndpointData;
96 EndpointAddress = DataINEndpoint->EndpointAddress;
106 EndpointAddress = DataOUTEndpoint->EndpointAddress;
158 uint8_t EndpointType = (Endpoint->Attributes &
EP_TYPE_MASK);
175 const void*
const BufferPtr)
200 if (BufferPtr !=
NULL)
217 uint16_t TimeoutMSRem = MS_COMMAND_DATA_TIMEOUT_MS;
228 if (CurrentFrameNumber != PreviousFrameNumber)
230 PreviousFrameNumber = CurrentFrameNumber;
232 if (!(TimeoutMSRem--))
275 uint16_t BytesRem =
le32_to_cpu(SCSICommandBlock->DataTransferLength);
277 #if defined(__LPC177X_8X__) || defined(__LPC407X_8X__)
397 uint8_t*
const MaxLUNIndex)
422 const uint8_t LUNIndex,
435 .SCSICommandLength = 6,
454 const uint8_t LUNIndex)
466 .SCSICommandLength = 6,
485 const uint8_t LUNIndex,
498 .SCSICommandLength = 10,
524 const uint8_t LUNIndex,
537 .SCSICommandLength = 6,
556 const uint8_t LUNIndex,
557 const bool PreventRemoval)
569 .SCSICommandLength = 6,
588 const uint8_t LUNIndex,
590 const uint8_t Blocks,
591 const uint16_t BlockSize,
604 .SCSICommandLength = 10,
609 (BlockAddress >> 24),
610 (BlockAddress >> 16),
612 (BlockAddress & 0xFF),
627 const uint8_t LUNIndex,
629 const uint8_t Blocks,
630 const uint16_t BlockSize,
631 const void* BlockBuffer)
643 .SCSICommandLength = 10,
648 (BlockAddress >> 24),
649 (BlockAddress >> 16),
651 (BlockAddress & 0xFF),