nRF5 SDK v17.1.0
Data Structures | Macros | Enumerations
USB MSC SCSI data structures

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

Data Structures

struct  app_usbd_scsi_cmd_requestsense_t
 Payload of APP_USBD_SCSI_CMD_REQUESTSENSE command. More...
 
struct  app_usbd_scsi_cmd_requestsense_resp_t
 Payload of APP_USBD_SCSI_CMD_REQUESTSENSE response. More...
 
struct  app_usbd_scsi_cmd_inquiry_t
 Payload of APP_USBD_SCSI_CMD_INQUIRY command. More...
 
struct  app_usbd_scsi_cmd_inquiry_resp_t
 Payload of APP_USBD_SCSI_CMD_INQUIRY response. More...
 
struct  app_usbd_scsi_cmd_read6_t
 Payload of APP_USBD_SCSI_CMD_READ6 command. More...
 
struct  app_usbd_scsi_cmd_write6_t
 Payload of APP_USBD_SCSI_CMD_WRITE6 command. More...
 
struct  app_usbd_scsi_cmd_modesense6_t
 Payload of APP_USBD_SCSI_CMD_MODESENSE6 command. More...
 
struct  app_usbd_scsi_cmd_modesense6_resp_t
 Payload of APP_USBD_SCSI_CMD_MODESENSE6 response. More...
 
struct  app_usbd_scsi_cmd_readcapacity10_t
 Payload of APP_USBD_SCSI_CMD_READCAPACITY10 command. More...
 
struct  app_usbd_scsi_cmd_readcapacity10_resp_t
 Payload of APP_USBD_SCSI_CMD_READCAPACITY10 response. More...
 
struct  app_usbd_scsi_cmd_read10_t
 Payload of APP_USBD_SCSI_CMD_READ10 command. More...
 
struct  app_usbd_scsi_cmd_write10_t
 Payload of APP_USBD_SCSI_CMD_WRITE10 command. More...
 
struct  app_usbd_scsi_cmd_modesense10_t
 Payload of APP_USBD_SCSI_CMD_MODESENSE10 command. More...
 
struct  app_usbd_scsi_cmd_modesense10_resp_t
 Payload of APP_USBD_SCSI_CMD_MODESENSE10 response. 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
 

Enumerations

enum  app_usbd_scsi_cmd_t {
  APP_USBD_SCSI_CMD_TESTUNITREADY = 0x00,
  APP_USBD_SCSI_CMD_REQUESTSENSE = 0x03,
  APP_USBD_SCSI_CMD_FORMAT_UNIT = 0x04,
  APP_USBD_SCSI_CMD_READ6 = 0x08,
  APP_USBD_SCSI_CMD_WRITE6 = 0x0A,
  APP_USBD_SCSI_CMD_INQUIRY = 0x12,
  APP_USBD_SCSI_CMD_MODESELECT6 = 0x15,
  APP_USBD_SCSI_CMD_MODESENSE6 = 0x1A,
  APP_USBD_SCSI_CMD_STARTSTOPUNIT = 0x1B,
  APP_USBD_SCSI_CMD_SENDDIAGNOSTIC = 0x1D,
  APP_USBD_SCSI_CMD_PREVENTMEDIAREMOVAL = 0x1E,
  APP_USBD_SCSI_CMD_READCAPACITY10 = 0x25,
  APP_USBD_SCSI_CMD_READ10 = 0x28,
  APP_USBD_SCSI_CMD_WRITE10 = 0x2A,
  APP_USBD_SCSI_CMD_MODESELECT10 = 0x55,
  APP_USBD_SCSI_CMD_MODESENSE10 = 0x5A
}
 SCSI command set. More...
 

Detailed Description

nRF52840 only: USB MSC SCSI data structures.

Reference specifications:

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 

Test unit ready.

APP_USBD_SCSI_CMD_REQUESTSENSE 

Request sense.

APP_USBD_SCSI_CMD_FORMAT_UNIT 

Format unit.

APP_USBD_SCSI_CMD_READ6 

Read 6.

APP_USBD_SCSI_CMD_WRITE6 

Write 6.

APP_USBD_SCSI_CMD_INQUIRY 

Inquiry.

APP_USBD_SCSI_CMD_MODESELECT6 

Mode select 6.

APP_USBD_SCSI_CMD_MODESENSE6 

Mode sense 6.

APP_USBD_SCSI_CMD_STARTSTOPUNIT 

Start/stop unit.

APP_USBD_SCSI_CMD_SENDDIAGNOSTIC 

Send diagnostic.

APP_USBD_SCSI_CMD_PREVENTMEDIAREMOVAL 

Prevent media removal.

APP_USBD_SCSI_CMD_READCAPACITY10 

Read capacity 10.

APP_USBD_SCSI_CMD_READ10 

Read 10.

APP_USBD_SCSI_CMD_WRITE10 

Write 10.

APP_USBD_SCSI_CMD_MODESELECT10 

Mode select 10.

APP_USBD_SCSI_CMD_MODESENSE10 

Mode sense 10.


Documentation feedback | Developer Zone | Subscribe | Updated