nRF5 SDK v13.0.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 

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


Documentation feedback | Developer Zone | Subscribe | Updated