#include <string.h>
#include "lpcusb\target\type.h"
#include "lpcusb\target\debug.h"
#include "blockdev.h"
#include "msc_scsi.h"
Go to the source code of this file.
Data Structures | |
struct | TCDB6 |
Defines | |
#define | BLOCKSIZE 512 |
#define | SCSI_CMD_TEST_UNIT_READY 0x00 |
#define | SCSI_CMD_REQUEST_SENSE 0x03 |
#define | SCSI_CMD_FORMAT_UNIT 0x04 |
#define | SCSI_CMD_READ_6 0x08 |
#define | SCSI_CMD_INQUIRY 0x12 |
#define | SCSI_CMD_SEND_DIAGNOSTIC 0x1D |
#define | SCSI_CMD_READ_CAPACITY_10 0x25 |
#define | SCSI_CMD_READ_10 0x28 |
#define | SCSI_CMD_REPORT_LUNS 0xA0 |
#define | SCSI_CMD_WRITE_6 0x0A |
#define | SCSI_CMD_WRITE_10 0x2A |
#define | SCSI_CMD_VERIFY_10 0x2F |
#define | WRITE_ERROR 0x030C00 |
#define | READ_ERROR 0x031100 |
#define | INVALID_CMD_OPCODE 0x052000 |
#define | INVALID_FIELD_IN_CDB 0x052400 |
Functions | |
void | SCSIReset (void) |
U8 * | SCSIHandleCmd (U8 *pbCDB, U8 iCDBLen, int *piRspLen, BOOL *pfDevIn) |
U8 * | SCSIHandleData (U8 *pbCDB, U8 iCDBLen, U8 *pbData, U32 dwOffset) |
This is the SCSI layer of the USB mass storage application example. This layer depends directly on the blockdev layer.
Windows peculiarities: Size of REQUEST SENSE CDB is 12 bytes instead of expected 6 Windows requires VERIFY(10) command to do a format. This command is not mandatory in the SBC/SBC-2 specification.
Definition in file msc_scsi.c.