LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SCSI command

Macros

#define SCSI_SET_SENSE(Key, Acode, Aqual)
 
#define DATA_READ   true
 
#define DATA_WRITE   false
 
#define DEVICE_TYPE_BLOCK   0x00
 
#define DEVICE_TYPE_CDROM   0x05
 

Functions

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.
 

Detailed Description

Macro Definition Documentation

#define DATA_READ   true

Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be read from the storage medium.

Definition at line 62 of file SCSI.h.

#define DATA_WRITE   false

Macro for the SCSI_Command_ReadWrite_10() function, to indicate that data is to be written to the storage medium.

Definition at line 65 of file SCSI.h.

#define DEVICE_TYPE_BLOCK   0x00

Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a Block Media device.

Definition at line 68 of file SCSI.h.

#define DEVICE_TYPE_CDROM   0x05

Value for the DeviceType entry in the SCSI_Inquiry_Response_t enum, indicating a CD-ROM device.

Definition at line 71 of file SCSI.h.

#define SCSI_SET_SENSE (   Key,
  Acode,
  Aqual 
)
Value:
MACROS {SenseData.SenseKey = (Key); \
SenseData.AdditionalSenseCode = (Acode); \
SenseData.AdditionalSenseQualifier = (Aqual); } MACROE

Macro to set the current SCSI sense data to the given key, additional sense code and additional sense qualifier. This is for convenience, as it allows for all three sense values (returned upon request to the host to give information about the last command failure) in a quick and easy manner.

Parameters
Key: New SCSI sense key to set the sense code to
Acode: New SCSI additional sense key to set the additional sense code to
Aqual: New SCSI additional sense key qualifier to set the additional sense qualifier code to

Definition at line 57 of file SCSI.h.

Function Documentation

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.

Parameters
MSInterfaceInfo: Pointer to the Mass Storage class interface structure that the command is associated with
Returns
Boolean true if the command completed successfully, false otherwise

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.

Parameters
MSInterfaceInfo: Pointer to the Mass Storage class interface structure that the command is associated with.
Returns
true : If the command completed successfully false : If command failed 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.

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.

Under development, not working yet. 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.

Definition at line 269 of file SCSI.c.