+/** Issues a SCSI Inquiry command to the attached device, to determine the device's information. This\r
+ *  gives information on the device's capabilities.\r
+ *\r
+ *  \param[in] LUNIndex    Index of the LUN inside the device the command is being addressed to\r
+ *  \param[out] InquiryPtr  Pointer to the inquiry data structure where the inquiry data from the device is to be stored\r
+ *\r
+ *  \return A value from the Pipe_Stream_RW_ErrorCodes_t enum, or MASS_STORE_SCSI_COMMAND_FAILED if the SCSI command fails\r
+ */\r
+uint8_t MassStore_Inquiry(const uint8_t LUNIndex, SCSI_Inquiry_Response_t* const InquiryPtr)\r
+{\r
+       uint8_t ErrorCode = PIPE_RWSTREAM_NoError;\r
+\r
+       /* Create a CBW with a SCSI command to issue INQUIRY command */\r
+       CommandBlockWrapper_t SCSICommandBlock = (CommandBlockWrapper_t)\r
+               {\r
+                       .Signature          = CBW_SIGNATURE,\r
+                       .DataTransferLength = sizeof(SCSI_Inquiry_Response_t),\r
+                       .Flags              = COMMAND_DIRECTION_DATA_IN,\r
+                       .LUN                = LUNIndex,\r
+                       .SCSICommandLength  = 6,\r
+                       .SCSICommandData    =\r
+                               {\r
+                                       SCSI_CMD_INQUIRY,\r
+                                       0x00,                   // Reserved\r
+                                       0x00,                   // Reserved\r
+                                       0x00,                   // Reserved\r
+                                       sizeof(SCSI_Inquiry_Response_t), // Allocation Length\r
+                                       0x00                    // Unused (control)\r
+                               }\r
+               };\r
+       \r
+       CommandStatusWrapper_t SCSICommandStatus;\r
+\r
+       /* Send the command and any data to the attached device */\r
+       if ((ErrorCode = MassStore_SendCommand(&SCSICommandBlock, InquiryPtr)) != PIPE_RWSTREAM_NoError)\r
+       {\r
+               Pipe_Freeze();\r
+               return ErrorCode;\r
+       }\r
+       \r
+       /* Retrieve status information from the attached device */\r
+       if ((ErrorCode = MassStore_GetReturnedStatus(&SCSICommandStatus)) != PIPE_RWSTREAM_NoError)\r
+       {\r
+               Pipe_Freeze();\r
+               return ErrorCode;\r
+       }\r
+\r
+       return ErrorCode;\r
+}\r
+\r