|
uint8_t | MS_Host_ConfigurePipes (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, uint16_t ConfigDescriptorSize, void *ConfigDescriptorData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3) |
| Host interface configuration routine, to configure a given Mass Storage host interface instance using the Configuration Descriptor read from an attached USB device. This function automatically updates the given Mass Storage Host instance's state values and configures the pipes required to communicate with the interface if it is found within the device. This should be called once after the stack has enumerated the attached device, while the host state machine is in the Addressed state.
|
|
uint8_t | MS_Host_ResetMSInterface (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) |
| Sends a MASS STORAGE RESET control request to the attached device, resetting the Mass Storage Interface and readying it for the next Mass Storage command. This should be called after a failed SCSI request to ensure the attached Mass Storage device is ready to receive the next command.
|
|
uint8_t | MS_Host_GetMaxLUN (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, uint8_t *const MaxLUNIndex) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2) |
| Sends a GET MAX LUN control request to the attached device, retrieving the index of the highest LUN (Logical UNit, a logical drive) in the device. This value can then be used in the other functions of the Mass Storage Host mode Class driver to address a specific LUN within the device.
|
|
uint8_t | MS_Host_GetInquiryData (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Inquiry_Response_t *const InquiryData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3) |
| Retrieves the Mass Storage device's inquiry data for the specified LUN, indicating the device characteristics and properties.
|
|
uint8_t | MS_Host_TestUnitReady (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex) ATTR_NON_NULL_PTR_ARG(1) |
| Sends a TEST UNIT READY command to the device, to determine if it is ready to accept other SCSI commands.
|
|
uint8_t | MS_Host_ReadDeviceCapacity (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Capacity_t *const DeviceCapacity) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3) |
| Retrieves the total capacity of the attached USB Mass Storage device, in blocks, and block size.
|
|
uint8_t | MS_Host_RequestSense (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, SCSI_Request_Sense_Response_t *const SenseData) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(3) |
| Retrieves the device sense data, indicating the current device state and error codes for the previously issued command.
|
|
uint8_t | MS_Host_PreventAllowMediumRemoval (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, const bool PreventRemoval) ATTR_NON_NULL_PTR_ARG(1) |
| Issues a PREVENT MEDIUM REMOVAL command, to logically (or, depending on the type of device, physically) lock the device from removal so that blocks of data on the medium can be read or altered.
|
|
uint8_t | MS_Host_ReadDeviceBlocks (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize, void *BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6) |
| Reads blocks of data from the attached Mass Storage device's medium.
|
|
uint8_t | MS_Host_WriteDeviceBlocks (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo, const uint8_t LUNIndex, const uint32_t BlockAddress, const uint8_t Blocks, const uint16_t BlockSize, const void *BlockBuffer) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6) |
| Writes blocks of data to the attached Mass Storage device's medium.
|
|
static void | MS_Host_USBTask (USB_ClassInfo_MS_Host_t *const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE |
| General management task for a given Mass Storage host class interface, required for the correct operation of the interface. This should be called frequently in the main program loop, before the master USB management task USB_USBTask().
|
|