|
|
@ -83,6 +83,8 @@ SCSI_Request_Sense_Response_t SenseData =
|
|
|
|
/** Main routine to process the SCSI command located in the Command Block Wrapper read from the host. This dispatches
|
|
|
|
/** Main routine to process the SCSI command located in the Command Block Wrapper read from the host. This dispatches
|
|
|
|
* to the appropriate SCSI command handling routine if the issued command is supported by the device, else it returns
|
|
|
|
* to the appropriate SCSI command handling routine if the issued command is supported by the device, else it returns
|
|
|
|
* a command failure due to a ILLEGAL REQUEST.
|
|
|
|
* a command failure due to a ILLEGAL REQUEST.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -140,6 +142,8 @@ bool SCSI_DecodeSCSICommand(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
/** Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features
|
|
|
|
/** Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features
|
|
|
|
* and capabilities to the host.
|
|
|
|
* and capabilities to the host.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
|
|
|
|
*
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
@ -180,6 +184,8 @@ static bool SCSI_Command_Inquiry(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
/** Command processing for an issued SCSI REQUEST SENSE command. This command returns information about the last issued command,
|
|
|
|
/** Command processing for an issued SCSI REQUEST SENSE command. This command returns information about the last issued command,
|
|
|
|
* including the error code and additional error information so that the host can determine why a command failed to complete.
|
|
|
|
* including the error code and additional error information so that the host can determine why a command failed to complete.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
|
|
|
|
*
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
@ -202,6 +208,8 @@ static bool SCSI_Command_Request_Sense(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
/** Command processing for an issued SCSI READ CAPACITY (10) command. This command returns information about the device's capacity
|
|
|
|
/** Command processing for an issued SCSI READ CAPACITY (10) command. This command returns information about the device's capacity
|
|
|
|
* on the selected Logical Unit (drive), as a number of OS-sized blocks.
|
|
|
|
* on the selected Logical Unit (drive), as a number of OS-sized blocks.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
|
|
|
|
*
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
@ -223,6 +231,8 @@ static bool SCSI_Command_Read_Capacity_10(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
* board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is
|
|
|
|
* board, and indicates if they are present and functioning correctly. Only the Self-Test portion of the diagnostic command is
|
|
|
|
* supported.
|
|
|
|
* supported.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
|
|
|
|
*
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
@ -286,6 +296,7 @@ static bool SCSI_Command_Send_Diagnostic(USB_ClassInfo_MS_t* MSInterfaceInfo)
|
|
|
|
* and total number of blocks to process, then calls the appropriate low-level dataflash routine to handle the actual
|
|
|
|
* and total number of blocks to process, then calls the appropriate low-level dataflash routine to handle the actual
|
|
|
|
* reading and writing of the data.
|
|
|
|
* reading and writing of the data.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param MSInterfaceInfo Pointer to the Mass Storage class interface structure that the command is associated with
|
|
|
|
* \param IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
|
|
|
|
* \param IsDataRead Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|
* \return Boolean true if the command completed successfully, false otherwise.
|
|
|
|