|
NetBurner 3.5.7
PDF Version |
Classes | |
| struct | _usb_host_cbw |
| MSC Bulk-Only command block wrapper (CBW) More... | |
| struct | _usb_host_csw |
| MSC Bulk-Only command status wrapper (CSW) More... | |
| struct | _usb_host_msd_command |
| MSC UFI command information structure. More... | |
| struct | _usb_host_msd_instance |
| MSD instance structure, MSD usb_host_class_handle pointer to this structure. More... | |
| struct | _usb_host_ufi_sense_data |
| UFI standard sense data structure. More... | |
| struct | _usb_host_ufi_inquiry_data |
| UFI standard inquiry data structure. More... | |
| struct | _usb_host_ufi_read_capacity |
| UFI read capacity data structure. More... | |
Typedefs | |
| typedef enum _usb_host_msd_command_status | usb_host_msd_command_status_t |
| UFI command process status. | |
| typedef struct _usb_host_cbw | usb_host_cbw_t |
| MSC Bulk-Only command block wrapper (CBW) | |
| typedef struct _usb_host_csw | usb_host_csw_t |
| MSC Bulk-Only command status wrapper (CSW) | |
| typedef struct _usb_host_msd_command | usb_host_msd_command_t |
| MSC UFI command information structure. | |
| typedef struct _usb_host_msd_instance | usb_host_msd_instance_t |
| MSD instance structure, MSD usb_host_class_handle pointer to this structure. | |
| typedef struct _usb_host_ufi_sense_data | usb_host_ufi_sense_data_t |
| UFI standard sense data structure. | |
| typedef struct _usb_host_ufi_inquiry_data | usb_host_ufi_inquiry_data_t |
| UFI standard inquiry data structure. | |
| typedef struct _usb_host_ufi_read_capacity | usb_host_ufi_read_capacity_t |
| UFI read capacity data structure. | |
Enumerations | |
| enum | _usb_host_msd_command_status |
| UFI command process status. | |
USB host MSD class APIs | |
| usb_status_t | USB_HostMsdInit (usb_device_handle deviceHandle, usb_host_class_handle *classHandle) |
| Initializes the MSD instance. | |
| usb_status_t | USB_HostMsdSetInterface (usb_host_class_handle classHandle, usb_host_interface_handle interfaceHandle, uint8_t alternateSetting, transfer_callback_t callbackFn, void *callbackParam) |
| Sets the interface. | |
| usb_status_t | USB_HostMsdDeinit (usb_device_handle deviceHandle, usb_host_class_handle classHandle) |
| Deinitializes the MSD instance. | |
| usb_status_t | USB_HostMsdMassStorageReset (usb_host_class_handle classHandle, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage reset. | |
| usb_status_t | USB_HostMsdGetMaxLun (usb_host_class_handle classHandle, uint8_t *logicalUnitNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Gets the maximum logical unit number. | |
| usb_status_t | USB_HostMsdRead10 (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint8_t *buffer, uint32_t bufferLength, uint32_t blockNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage read (10). | |
| usb_status_t | USB_HostMsdRead12 (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint8_t *buffer, uint32_t bufferLength, uint32_t blockNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage read (12). | |
| usb_status_t | USB_HostMsdWrite10 (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint8_t *buffer, uint32_t bufferLength, uint32_t blockNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage write (10). | |
| usb_status_t | USB_HostMsdWrite12 (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint8_t *buffer, uint32_t bufferLength, uint32_t blockNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage write (12). | |
| usb_status_t | USB_HostMsdReadCapacity (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage read capacity. | |
| usb_status_t | USB_HostMsdTestUnitReady (usb_host_class_handle classHandle, uint8_t logicalUnit, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage test unit ready. | |
| usb_status_t | USB_HostMsdRequestSense (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| mass storage request sense. | |
| usb_status_t | USB_HostMsdModeSelect (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage mode select. | |
| usb_status_t | USB_HostMsdModeSense (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t pageControl, uint8_t pageCode, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage mode sense. | |
| usb_status_t | USB_HostMsdInquiry (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage inquiry. | |
| usb_status_t | USB_HostMsdReadFormatCapacities (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage read format capacities. | |
| usb_status_t | USB_HostMsdFormatUnit (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t trackNumber, uint16_t interLeave, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage format unit. | |
| usb_status_t | USB_HostMsdPreventAllowRemoval (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t prevent, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage prevents/allows a medium removal. | |
| usb_status_t | USB_HostMsdWriteAndVerify (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint8_t *buffer, uint32_t bufferLength, uint32_t blockNumber, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage write and verify. | |
| usb_status_t | USB_HostMsdStartStopUnit (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t loadEject, uint8_t start, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage start stop unit. | |
| usb_status_t | USB_HostMsdVerify (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, uint16_t verificationLength, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage verify. | |
| usb_status_t | USB_HostMsdRezeroUnit (usb_host_class_handle classHandle, uint8_t logicalUnit, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage rezero. | |
| usb_status_t | USB_HostMsdSeek10 (usb_host_class_handle classHandle, uint8_t logicalUnit, uint32_t blockAddress, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage seek(10). | |
| usb_status_t | USB_HostMsdSendDiagnostic (usb_host_class_handle classHandle, uint8_t logicalUnit, uint8_t selfTest, transfer_callback_t callbackFn, void *callbackParam) |
| Mass storage send diagnostic. | |
| usb_status_t | USB_HostMsdCommand (usb_host_class_handle classHandle, uint8_t *buffer, uint32_t bufferLength, transfer_callback_t callbackFn, void *callbackParam, uint8_t direction, uint8_t byteValues[10]) |
| all ufi function calls this api. | |
| usb_status_t USB_HostMsdCommand | ( | usb_host_class_handle | classHandle, |
| uint8_t * | buffer, | ||
| uint32_t | bufferLength, | ||
| transfer_callback_t | callbackFn, | ||
| void * | callbackParam, | ||
| uint8_t | direction, | ||
| uint8_t | byteValues[10] ) |
#include <usb_host_msd.h>
all ufi function calls this api.
This function implements the common ufi commands.
| classHandle | the class msd handle. |
| buffer | buffer pointer. |
| bufferLength | buffer length. |
| callbackFn | callback function. |
| callbackParam | callback parameter. |
| direction | command direction. |
| byteValues | ufi command fields value. |
|
extern |
#include <usb_host_msd.h>
Deinitializes the MSD instance.
This function frees the resource for the MSD instance.
| [in] | deviceHandle | The device handle. |
| [in] | classHandle | The class handle. |
| kStatus_USB_Success | The device is de-initialized successfully. |
|
extern |
#include <usb_host_msd.h>
Mass storage format unit.
This function implements the UFI FORMAT UNIT command and the host sends this command to physically format one track of a diskette according to the selected options.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | trackNumber | This specifies which track is to be formatted. |
| [in] | interLeave | This specifies the interleave that shall be used for formatting. |
| [in] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Gets the maximum logical unit number.
This function implements the get maximum LUN request.
| [in] | classHandle | The class handle. |
| [out] | logicalUnitNumber | Return logical unit number value. |
| [in] | callbackFn | This callback is called after this function completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | There is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSendSetup. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Initializes the MSD instance.
This function allocates the resources for the MSD instance.
| [in] | deviceHandle | The device handle. |
| [out] | classHandle | Return class handle. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_AllocFail | Allocate memory fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage inquiry.
This function implements the UFI INQUIRY command and requests that information regarding parameters of the UFI device itself be sent to the host.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage reset.
This function implements the mass storage reset request.
| [in] | classHandle | The class handle. |
| [in] | callbackFn | This callback is called after this function completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | There is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSendSetup. |
|
extern |
#include <usb_host_msd.h>
Mass storage mode select.
This function implements the UFI MODE SELECT command and allows the host to specify medium or device parameters to the UFI device.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage mode sense.
This function implements the UFI MODE SENSE command and allows the UFI device to report medium or device parameters to the host.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | pageControl | The page control field specifies the type of mode parameters to return. |
| [in] | pageCode | Buffer pointer. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage prevents/allows a medium removal.
This function implements the UFI PREVENT-ALLOW MEDIUM REMOVAL command and notifies the FUI device to enable or disable the removal of the medium in the logical unit.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | prevent | Prevent or allow
|
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage read (10).
This function implements the UFI READ(10) command. This command requests that the UFI device transfer data to the host.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | blockNumber | Read block number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage read (12).
This function implements the UFI READ(12) command and requests that the UFI device transfer data to the host.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | blockNumber | Read block number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage read capacity.
This function implements the UFI READ CAPACITY command and allows the host to request capacities of the currently installed medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage read format capacities.
This function implements the UFI READ FORMAT CAPACITIES command and allows the host to request a list of the possible capacities that can be formatted on the currently installed medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
mass storage request sense.
This function implements the UFI REQUEST SENSE command, this command instructs the UFI device to transfer sense data to the host for the specified logical unit.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [out] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage rezero.
This function implements the UFI REZERO UNIT command. This command positions the head of the drive to the cylinder 0.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage seek(10).
This function implements the UFI SEEK(10) command and requests that the UFI device seek to the specified Logical Block Address.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage send diagnostic.
This function implements the UFI SEND DIAGNOSTIC command. This command requests the UFI device to do a reset or perform a self-test.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | selfTest | 0 = perform special diagnostic test; 1 = perform default self-test. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Sets the interface.
This function binds the interface with the MSD instance.
| [in] | classHandle | The class handle. |
| [in] | interfaceHandle | The interface handle. |
| [in] | alternateSetting | The alternate setting value. |
| [in] | callbackFn | This callback is called after this function completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | There is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSendSetup. |
| kStatus_USB_Success | Callback return status, the command succeeded. |
| kStatus_USB_Busy | Callback return status, there is no idle pipe. |
| kStatus_USB_TransferStall | Callback return status, the transfer is stalled by the device. |
| kStatus_USB_Error | Callback return status, open pipe fail. See the USB_HostOpenPipe. |
|
extern |
#include <usb_host_msd.h>
Mass storage start stop unit.
This function implements the UFI START-STOP UNIT command and instructs the UFI device to enable or disable media access operations .
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | loadEject | A Load Eject (LoEj) bit of zero requests that no eject action be performed. A LoEj bit of one, with the Start bit cleared to zero, which instructs the UFI device to eject the media. |
| [in] | start | A Start bit of one instructs the UFI device to enable media access operations. A Start bit of zero instructs the UFI device to disable media access operations. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage test unit ready.
This function implements the UFI TEST UNIT READY command and checks if the UFI device is ready.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage verify.
This function implements the UFI VERIFY command and requests that the UFI device verify the data on the medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [in] | verificationLength | The data length that need to be verified. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage write (10).
This function implements the UFI WRITE(10) command and requests that the UFI device write the data transferred by the host to the medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [in] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | blockNumber | Write block number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage write (12).
This function implements the UFI WRITE(12) command and requests that the UFI device write the data transferred by the host to the medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [in] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | blockNumber | Write block number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |
|
extern |
#include <usb_host_msd.h>
Mass storage write and verify.
This function implements the UFI WRITE AND VERIFY command and requests that the UFI device writes the data transferred by the host to the medium, then verifies the data on the medium.
| [in] | classHandle | The class MSD handle. |
| [in] | logicalUnit | Logical unit number. |
| [in] | blockAddress | The start block address. |
| [in] | buffer | Buffer pointer. |
| [in] | bufferLength | The buffer length. |
| [in] | blockNumber | Write and verify block number. |
| [in] | callbackFn | This callback is called after this command completes. |
| [in] | callbackParam | The first parameter in the callback function. |
| kStatus_USB_Success | The device is initialized successfully. |
| kStatus_USB_InvalidHandle | The classHandle is NULL pointer. |
| kStatus_USB_Busy | The previous command is executing or there is no idle transfer. |
| kStatus_USB_Error | Send transfer fail. See the USB_HostSend/USB_HostRecv. |
| kStatus_USB_Success | Callback return status, the command succeed. |
| kStatus_USB_MSDStatusFail | Callback return status, the CSW status indicate this command fail. |
| kStatus_USB_Error | Callback return status, the command fail. |