LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SCSI.c File Reference
#include "SCSI.h"

Go to the source code of this file.

Macros

#define INCLUDE_FROM_SCSI_C
 

Functions

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_Send_Diagnostic (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)
 
bool SCSI_DecodeSCSICommand (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo)
 SCSI Command processing function.
 

Variables

static const
SCSI_Inquiry_Response_t 
InquiryData
 
static
SCSI_Request_Sense_Response_t 
SenseData
 

Macro Definition Documentation

#define INCLUDE_FROM_SCSI_C

Definition at line 37 of file SCSI.c.

Function Documentation

static bool SCSI_Command_Inquiry ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)
static

Definition at line 100 of file SCSI.c.

static bool SCSI_Command_ModeSense_6 ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)
static

Definition at line 253 of file SCSI.c.

static bool SCSI_Command_Read_Capacity_10 ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)
static

Definition at line 148 of file SCSI.c.

static bool SCSI_Command_ReadWrite_10 ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo,
const bool  IsDataRead 
)
static

Definition at line 182 of file SCSI.c.

static bool SCSI_Command_Request_Sense ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)
static

Definition at line 132 of file SCSI.c.

static bool SCSI_Command_Send_Diagnostic ( USB_ClassInfo_MS_Device_t *const  MSInterfaceInfo)
static

Definition at line 164 of file SCSI.c.

Variable Documentation

const SCSI_Inquiry_Response_t InquiryData
static
Initial value:
= {
.DeviceType = DEVICE_TYPE_BLOCK,
.PeripheralQualifier = 0,
.Removable = true,
.Version = 0,
.ResponseDataFormat = 2,
.NormACA = false,
.TrmTsk = false,
.AERC = false,
.AdditionalLength = 0x1F,
.SoftReset = false,
.CmdQue = false,
.Linked = false,
.Sync = false,
.WideBus16Bit = false,
.WideBus32Bit = false,
.RelAddr = false,
.VendorID = "NXP",
.ProductID = "Dataflash Disk",
.RevisionID = {'0', '.', '0', '0'},
}

Structure to hold the SCSI response data to a SCSI INQUIRY command. This gives information about the device's features and capabilities.

Definition at line 48 of file SCSI.c.

Initial value:
= {
.ResponseCode = 0x70,
.AdditionalLength = 0x0A,
}

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.

Definition at line 82 of file SCSI.c.