LUFA Library - Mass Storage Class Bootloader
|
#include "SCSI.h"
Functions | |
bool | SCSI_DecodeSCSICommand (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo) |
static bool | SCSI_Command_Inquiry (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo) |
static bool | SCSI_Command_Request_Sense (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo) |
static bool | SCSI_Command_Read_Capacity_10 (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo) |
static bool | SCSI_Command_ReadWrite_10 (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo, const bool IsDataRead) |
static bool | SCSI_Command_ModeSense_6 (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo) |
Variables | |
static const SCSI_Inquiry_Response_t | InquiryData |
static SCSI_Request_Sense_Response_t | SenseData |
SCSI command processing routines, for SCSI commands issued by the host. Mass Storage devices use a thin "Bulk-Only Transport" protocol for issuing commands and status information, which wrap around standard SCSI device commands for controlling the actual storage medium.
|
static |
Command processing for an issued SCSI INQUIRY command. This command returns information about the device's features and capabilities to the host.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
true
if the command completed successfully, false
otherwise.
|
static |
Command processing for an issued SCSI MODE SENSE (6) command. This command returns various informational pages about the SCSI device, as well as the device's Write Protect status.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
true
if the command completed successfully, false
otherwise.
|
static |
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.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
true
if the command completed successfully, false
otherwise.
|
static |
Command processing for an issued SCSI READ (10) or WRITE (10) command. This command reads in the block start address 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.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
[in] | IsDataRead | Indicates if the command is a READ (10) command or WRITE (10) command (DATA_READ or DATA_WRITE) |
true
if the command completed successfully, false
otherwise.
|
static |
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.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
true
if the command completed successfully, false
otherwise. bool SCSI_DecodeSCSICommand | ( | USB_ClassInfo_MS_Device_t *const | MSInterfaceInfo) |
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 a command failure due to a ILLEGAL REQUEST.
[in] | MSInterfaceInfo | Pointer to the Mass Storage class interface structure that the command is associated with |
true
if the command completed successfully, false
otherwise
|
static |
Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's features and capabilities.
|
static |
Structure to hold the sense data for the last issued SCSI command, which is returned to the host after a SCSI REQUEST SENSE command is issued. This gives information on exactly why the last command failed to complete.