+ /** Host interface configuration routine, to configure a given Mass Storage host interface instance using the\r
+ * Configuration Descriptor read from an attached USB device. This function automatically updates the given Mass\r
+ * Storage Host instance's state values and configures the pipes required to communicate with the interface if it\r
+ * is found within the device. This should be called once after the stack has enumerated the attached device, while\r
+ * the host state machine is in the Addressed state.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing an MS Class host configuration and state\r
+ * \param[in] ConfigDescriptorSize Length of the attached device's Configuration Descriptor\r
+ * \param[in] DeviceConfigDescriptor Pointer to a buffer containing the attached device's Configuration Descriptor\r
+ *\r
+ * \return A value from the \ref MSHost_EnumerationFailure_ErrorCodes_t enum\r
+ */\r
+ uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint16_t ConfigDescriptorSize,\r
+ void* DeviceConfigDescriptor) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+ /** Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface\r
+ * and readying it for the next Mass Storage command.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state\r
+ *\r
+ * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum\r
+ */\r
+ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+ /** Sends a GET MAX LUN control request to the attached device, retrieving the index of the highest LUN (Logical\r
+ * UNit, a logical drive) in the device. This value can then be used in the other functions of the Mass Storage\r
+ * Host mode Class driver to address a specific LUN within the device.\r
+ *\r
+ * \note Some devices do not support this request, and will STALL it when issued. To get around this,\r
+ * on unsupported devices the max LUN index will be reported as zero and no error will be returned\r
+ * if the device STALLs the request.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state\r
+ * \param[out] MaxLUNIndex Pointer to a location where the highest LUN index value should be stored\r
+ *\r
+ * \return A value from the \ref USB_Host_SendControlErrorCodes_t enum\r
+ */\r
+ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, uint8_t* const MaxLUNIndex)\r
+ ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);\r
+\r
+ /** Retrieves the Mass Storage device's inquiry data for the specified LUN, indicating the device characteristics and\r
+ * properties.\r
+ *\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state\r
+ * \param[in] LUNIndex LUN index within the device the command is being issued to\r
+ * \param[out] InquiryData Location where the read inquiry data should be stored\r
+ *\r
+ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED\r
+ */\r
+ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,\r
+ SCSI_Inquiry_Response_t* const InquiryData) ATTR_NON_NULL_PTR_ARG(1)\r
+ ATTR_NON_NULL_PTR_ARG(3);\r
+\r
+ /** Sends a TEST UNIT READY command to the device, to determine if it is ready to accept other SCSI commands.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state\r
+ * \param[in] LUNIndex LUN index within the device the command is being issued to\r
+ *\r
+ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready\r
+ */\r
+ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex)\r
+ ATTR_NON_NULL_PTR_ARG(1);\r
+\r
+ /** Retrieves the total capacity of the attached USB Mass Storage device, in blocks, and block size.\r
+ *\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
+ * \param[in,out] MSInterfaceInfo Pointer to a structure containing a MS Class host configuration and state\r
+ * \param[in] LUNIndex LUN index within the device the command is being issued to\r
+ * \param[out] DeviceCapacity Pointer to the location where the capacity information should be stored\r
+ *\r
+ * \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum or MS_ERROR_LOGICAL_CMD_FAILED if not ready\r
+ */\r
+ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, const uint8_t LUNIndex,\r
+ SCSI_Capacity_t* const DeviceCapacity) ATTR_NON_NULL_PTR_ARG(1)\r
+ ATTR_NON_NULL_PTR_ARG(3);\r