USB MSC SCSI data structures

nRF5 SDK v12.2.0

nRF52840 only: USB MSC SCSI data structures. More...

Macros

#define APP_USBD_SCSI_CMD_REQSENSE_CODE_VALID 0x80
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_CURRENT 0x70
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_DEFERRED 0x71
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_CURRENTDESC 0x72
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_DEFERREDDESC 0x73
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_FILEMARK 0x80
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_EOM 0x40
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ILI 0x20
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_RESERVED 0x10
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_NOSENSE 0x00
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_RECOVEREDERROR 0x01
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_NOTREADY 0x02
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_MEDIUMERROR 0x03
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_HARDWAREERROR 0x04
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ILLEGALREQUEST 0x05
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_UNITATTENTION 0x06
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_DATAPROTECT 0x07
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_BLANKCHECK 0x08
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_VENDORSPECIFIC 0x09
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ABORTEDCOMMAND 0x0b
#define APP_USBD_SCSI_CMD_TESTUNITREADY_LEN 6
#define APP_USBD_MSC_SCSI_INQ_QUAL_CONNECTED 0x00
#define APP_USBD_MSC_SCSI_INQ_QUAL_NOT_CONN 0x20
#define APP_USBD_MSC_SCSI_INQ_QUAL_NOT_SUPP 0x60
#define APP_USBD_MSC_SCSI_INQ_TYPE_DIR_ACCESS 0x00
#define APP_USBD_MSC_SCSI_INQ_TYPE_SEQ_ACCESS 0x01
#define APP_USBD_MSC_SCSI_INQ_TYPE_PRINTER 0x02
#define APP_USBD_MSC_SCSI_INQ_TYPE_PROCESSOR 0x03
#define APP_USBD_MSC_SCSI_INQ_TYPE_WRITE_ONCE 0x04
#define APP_USBD_MSC_SCSI_INQ_TYPE_CD_DVD 0x05
#define APP_USBD_MSC_SCSI_INQ_TYPE_OPTICAL 0x07
#define APP_USBD_MSC_SCSI_INQ_TYPE_MC 0x08
#define APP_USBD_MSC_SCSI_INQ_TYPE_ARRAY 0x0c
#define APP_USBD_MSC_SCSI_INQ_TYPE_ENCLOSURE 0x0d
#define APP_USBD_MSC_SCSI_INQ_TYPE_RBC 0x0e
#define APP_USBD_MSC_SCSI_INQ_TYPE_OCRW 0x0f
#define APP_USBD_MSC_SCSI_INQ_TYPE_BCC 0x10
#define APP_USBD_MSC_SCSI_INQ_TYPE_OSD 0x11
#define APP_USBD_MSC_SCSI_INQ_TYPE_NONE 0x1f
#define APP_USBD_MSC_SCSI_INQ_FLAG1_RMB 0x80
#define APP_USBD_SCSI_INQ_VER_NONE 0x00
#define APP_USBD_SCSI_INQ_VER_SPC 0x03
#define APP_USBD_SCSI_INQ_VER_SPC2 0x04
#define APP_USBD_SCSI_INQ_VER_SPC3 0x05
#define APP_USBD_SCSI_INQ_VER_SPC4 0x06
#define APP_USBD_MSC_SCSI_INQ_FLAG2_NORMACA 0x20
#define APP_USBD_MSC_SCSI_INQ_FLAG2_HISUP 0x10
#define APP_USBD_MSC_SCSI_INQ_FLAG2_RSP_SPC2 0x02

Detailed Description

nRF52840 only: USB MSC SCSI data structures.

Reference specifications:

  • "Reduced Block Commands (Revision 10a)" American National Standard for Information Technology, August 18, 1999
  • "SCSI Primary Commands - 4 (SPC-4)," American National Standard for Information Technology, July 19, 2008
  • "SCSI Block Commands -2 (SBC-2)," American National Standard for Information Technology, November 13, 2004
  • NuttX source code - Real-time Operating System: http://nuttx.org/ Gregory Nutt gnutt .nosp@m. @nut .nosp@m. tx.or .nosp@m. g

Macro Definition Documentation

#define APP_USBD_MSC_SCSI_INQ_FLAG1_RMB   0x80

Removable Medium

#define APP_USBD_MSC_SCSI_INQ_FLAG2_HISUP   0x10

Hierarchal LUN addressing

#define APP_USBD_MSC_SCSI_INQ_FLAG2_NORMACA   0x20

Normal ACA Supported

#define APP_USBD_MSC_SCSI_INQ_FLAG2_RSP_SPC2   0x02

SPC-2 / SPC-3 response format

#define APP_USBD_MSC_SCSI_INQ_QUAL_CONNECTED   0x00

Peripheral connected

#define APP_USBD_MSC_SCSI_INQ_QUAL_NOT_CONN   0x20

Peripheral not connected

#define APP_USBD_MSC_SCSI_INQ_QUAL_NOT_SUPP   0x60

Peripheral not supported

#define APP_USBD_MSC_SCSI_INQ_TYPE_ARRAY   0x0c

Storage Array Controller

#define APP_USBD_MSC_SCSI_INQ_TYPE_BCC   0x10

Bridge Controller Commands

#define APP_USBD_MSC_SCSI_INQ_TYPE_CD_DVD   0x05

CD/DVD device

#define APP_USBD_MSC_SCSI_INQ_TYPE_DIR_ACCESS   0x00

Direct Access (SBC)

#define APP_USBD_MSC_SCSI_INQ_TYPE_ENCLOSURE   0x0d

Enclosure Services

#define APP_USBD_MSC_SCSI_INQ_TYPE_MC   0x08

Medium Changer

#define APP_USBD_MSC_SCSI_INQ_TYPE_NONE   0x1f

No Peripheral

#define APP_USBD_MSC_SCSI_INQ_TYPE_OCRW   0x0f

Optical card reader/writer

#define APP_USBD_MSC_SCSI_INQ_TYPE_OPTICAL   0x07

Optical Memory

#define APP_USBD_MSC_SCSI_INQ_TYPE_OSD   0x11

Object-based Storage

#define APP_USBD_MSC_SCSI_INQ_TYPE_PRINTER   0x02

Printer

#define APP_USBD_MSC_SCSI_INQ_TYPE_PROCESSOR   0x03

Processor device

#define APP_USBD_MSC_SCSI_INQ_TYPE_RBC   0x0e

Simplified Direct Access

#define APP_USBD_MSC_SCSI_INQ_TYPE_SEQ_ACCESS   0x01

Sequential Access

#define APP_USBD_MSC_SCSI_INQ_TYPE_WRITE_ONCE   0x04

Write-once device

#define APP_USBD_SCSI_CMD_REQSENSE_CODE_CURRENT   0x70
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_CURRENTDESC   0x72
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_DEFERRED   0x71
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_DEFERREDDESC   0x73
#define APP_USBD_SCSI_CMD_REQSENSE_CODE_VALID   0x80
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ABORTEDCOMMAND   0x0b
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_BLANKCHECK   0x08
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_DATAPROTECT   0x07
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_EOM   0x40
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_FILEMARK   0x80
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_HARDWAREERROR   0x04
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ILI   0x20
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_ILLEGALREQUEST   0x05
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_MEDIUMERROR   0x03
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_NOSENSE   0x00
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_NOTREADY   0x02
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_RECOVEREDERROR   0x01
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_RESERVED   0x10
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_UNITATTENTION   0x06
#define APP_USBD_SCSI_CMD_REQSENSE_FLAG_VENDORSPECIFIC   0x09
#define APP_USBD_SCSI_CMD_TESTUNITREADY_LEN   6
#define APP_USBD_SCSI_INQ_VER_NONE   0x00

No standards conformance

#define APP_USBD_SCSI_INQ_VER_SPC   0x03

SCSI Primary Commands (link to SBC)

#define APP_USBD_SCSI_INQ_VER_SPC2   0x04

SCSI Primary Commands - 2 (link to SBC-2)

#define APP_USBD_SCSI_INQ_VER_SPC3   0x05

SCSI Primary Commands - 3 (link to SBC-2)

#define APP_USBD_SCSI_INQ_VER_SPC4   0x06

SCSI Primary Commands - 4 (link to SBC-3)

Enumeration Type Documentation

SCSI command set.

Mandatory (and some optional) commands required by SBC-2.

Enumerator
APP_USBD_SCSI_CMD_TESTUNITREADY

TESTUNITREADY

APP_USBD_SCSI_CMD_REQUESTSENSE

REQUESTSENSE

APP_USBD_SCSI_CMD_FORMAT_UNIT

FORMAT_UNIT

APP_USBD_SCSI_CMD_READ6

READ6

APP_USBD_SCSI_CMD_WRITE6

WRITE6

APP_USBD_SCSI_CMD_INQUIRY

INQUIRY

APP_USBD_SCSI_CMD_MODESELECT6

MODESELECT6

APP_USBD_SCSI_CMD_MODESENSE6

MODESENSE6

APP_USBD_SCSI_CMD_STARTSTOPUNIT

STARTSTOPUNIT

APP_USBD_SCSI_CMD_SENDDIAGNOSTIC

SENDDIAGNOSTIC

APP_USBD_SCSI_CMD_PREVENTMEDIAREMOVAL

PREVENTMEDIAREMOVAL

APP_USBD_SCSI_CMD_READCAPACITY10

READCAPACITY10

APP_USBD_SCSI_CMD_READ10

READ10

APP_USBD_SCSI_CMD_WRITE10

WRITE10

APP_USBD_SCSI_CMD_MODESELECT10

MODESELECT10

APP_USBD_SCSI_CMD_MODESENSE10

MODESENSE10