Loading...
Searching...
No Matches
USBUS Mass Storage Class functions

Detailed Description

Files

file  msc.h
 USB Mass Storage Class functions definitions.
 
file  msc.h
 USBUS Mass Storage Class functions definitions.
 
file  scsi.h
 SCSI protocol definitions for USBUS.
 

Macros

#define USB_MSC_CBW_FLAG_IN   0x80
 Command Block Wrapper flags.
 

USB Mass Storage Class subclass definitions

See also
Table 1 — SubClass Codes Mapped to Command Block Specifications from Universal Serial Bus Mass Storage Class Specification Overview 1.4
#define USB_MSC_SUBCLASS_SCSI   0x00
 SCSI command set not reported.
 
#define USB_MSC_SUBCLASS_RBC   0x01
 RBC allocated by USB-IF.
 
#define USB_MSC_SUBCLASS_MMC5   0x02
 MMC5 allocated by USB-IF.
 
#define USB_MSC_SUBCLASS_UFI   0x04
 Interface Floppy Disk Drives.
 
#define USB_MSC_SUBCLASS_SCSI_TCS   0x06
 SCSI transparent command set.
 
#define USB_MSC_SUBCLASS_LSDFS   0x07
 Early negotiation access.
 
#define USB_MSC_SUBCLASS_IEEE1667   0x08
 IEEE1677 allocated by USB-IF.
 
#define USB_MSC_SUBCLASS_VENDOR   0xFF
 Vendor Specific.
 

USB Mass Storage Class protocol definitions

See also
Table 2 — Mass Storage Transport Protocol from Universal Serial Bus Mass Storage Class Specification Overview 1.4
#define USB_MSC_PROTOCOL_CBI_CCI   0x00
 CBI transport with command completion interrupt.
 
#define USB_MSC_PROTOCOL_CBI_NO_CCI   0x01
 CBI transport without command completion \ interrupt.
 
#define USB_MSC_PROTOCOL_BBB   0x50
 Bulk only (BBB) transport.
 
#define USB_MSC_PROTOCOL_UAS   0x62
 UAS allocated by USB-IF.
 
#define USB_MSC_PROTOCOL_VENDOR   0xFF
 Vendor Specific.
 

USB Mass Storage Class request codes

See also
Table 3 — Mass Storage Request Codes from Universal Serial Bus Mass Storage Class Specification Overview 1.4
#define USB_MSC_SETUP_REQ_ADSC   0x01
 Accept Device-Specific Command request.
 
#define USB_MSC_SETUP_REQ_GET_REQ   0xFC
 Get Request.
 
#define USB_MSC_SETUP_REQ_PUT_REQ   0xFD
 Put Request.
 
#define USB_MSC_SETUP_REQ_GML   0xFE
 Get Max LUN request.
 
#define USB_MSC_SETUP_REQ_BOMSR   0xFF
 Bulk-Only Mass Storage Reset request.
 

USB Mass Storage Class CSW status code

See also
Table 5.3 — Command Block Status Values from Universal Serial Bus Mass Storage Class Bulk-Only Transport
#define USB_MSC_CSW_STATUS_COMMAND_PASSED   0x00
 CSW Status command successful.
 
#define USB_MSC_CSW_STATUS_COMMAND_FAILED   0x01
 CSW Status command failure.
 
#define USB_MSC_CSW_STATUS_COMMAND_PHASE_ERROR   0x02
 CSW Status command phase error.
 

Macro Definition Documentation

◆ USB_MSC_CBW_FLAG_IN

#define USB_MSC_CBW_FLAG_IN   0x80

Command Block Wrapper flags.

See also
Chap 5.1 — Command Block Wrapper (CBW) from Universal Serial Bus Mass Storage Class Bulk-Only Transport Indicate Device to Host direction

Definition at line 71 of file msc.h.

◆ USB_MSC_CSW_STATUS_COMMAND_FAILED

#define USB_MSC_CSW_STATUS_COMMAND_FAILED   0x01

CSW Status command failure.

Definition at line 95 of file msc.h.

◆ USB_MSC_CSW_STATUS_COMMAND_PASSED

#define USB_MSC_CSW_STATUS_COMMAND_PASSED   0x00

CSW Status command successful.

Definition at line 94 of file msc.h.

◆ USB_MSC_CSW_STATUS_COMMAND_PHASE_ERROR

#define USB_MSC_CSW_STATUS_COMMAND_PHASE_ERROR   0x02

CSW Status command phase error.

Definition at line 96 of file msc.h.

◆ USB_MSC_PROTOCOL_BBB

#define USB_MSC_PROTOCOL_BBB   0x50

Bulk only (BBB) transport.

Definition at line 60 of file msc.h.

◆ USB_MSC_PROTOCOL_CBI_CCI

#define USB_MSC_PROTOCOL_CBI_CCI   0x00

CBI transport with command completion interrupt.

Definition at line 57 of file msc.h.

◆ USB_MSC_PROTOCOL_CBI_NO_CCI

#define USB_MSC_PROTOCOL_CBI_NO_CCI   0x01

CBI transport without command completion \ interrupt.

Definition at line 59 of file msc.h.

◆ USB_MSC_PROTOCOL_UAS

#define USB_MSC_PROTOCOL_UAS   0x62

UAS allocated by USB-IF.

Definition at line 61 of file msc.h.

◆ USB_MSC_PROTOCOL_VENDOR

#define USB_MSC_PROTOCOL_VENDOR   0xFF

Vendor Specific.

Definition at line 62 of file msc.h.

◆ USB_MSC_SETUP_REQ_ADSC

#define USB_MSC_SETUP_REQ_ADSC   0x01

Accept Device-Specific Command request.

Definition at line 80 of file msc.h.

◆ USB_MSC_SETUP_REQ_BOMSR

#define USB_MSC_SETUP_REQ_BOMSR   0xFF

Bulk-Only Mass Storage Reset request.

Definition at line 84 of file msc.h.

◆ USB_MSC_SETUP_REQ_GET_REQ

#define USB_MSC_SETUP_REQ_GET_REQ   0xFC

Get Request.

Definition at line 81 of file msc.h.

◆ USB_MSC_SETUP_REQ_GML

#define USB_MSC_SETUP_REQ_GML   0xFE

Get Max LUN request.

Definition at line 83 of file msc.h.

◆ USB_MSC_SETUP_REQ_PUT_REQ

#define USB_MSC_SETUP_REQ_PUT_REQ   0xFD

Put Request.

Definition at line 82 of file msc.h.

◆ USB_MSC_SUBCLASS_IEEE1667

#define USB_MSC_SUBCLASS_IEEE1667   0x08

IEEE1677 allocated by USB-IF.

Definition at line 46 of file msc.h.

◆ USB_MSC_SUBCLASS_LSDFS

#define USB_MSC_SUBCLASS_LSDFS   0x07

Early negotiation access.

Definition at line 45 of file msc.h.

◆ USB_MSC_SUBCLASS_MMC5

#define USB_MSC_SUBCLASS_MMC5   0x02

MMC5 allocated by USB-IF.

Definition at line 42 of file msc.h.

◆ USB_MSC_SUBCLASS_RBC

#define USB_MSC_SUBCLASS_RBC   0x01

RBC allocated by USB-IF.

Definition at line 41 of file msc.h.

◆ USB_MSC_SUBCLASS_SCSI

#define USB_MSC_SUBCLASS_SCSI   0x00

SCSI command set not reported.

Definition at line 40 of file msc.h.

◆ USB_MSC_SUBCLASS_SCSI_TCS

#define USB_MSC_SUBCLASS_SCSI_TCS   0x06

SCSI transparent command set.

Definition at line 44 of file msc.h.

◆ USB_MSC_SUBCLASS_UFI

#define USB_MSC_SUBCLASS_UFI   0x04

Interface Floppy Disk Drives.

Definition at line 43 of file msc.h.

◆ USB_MSC_SUBCLASS_VENDOR

#define USB_MSC_SUBCLASS_VENDOR   0xFF

Vendor Specific.

Definition at line 47 of file msc.h.