- Main Page
- Modules
- Data Structures
- Files

Defines
USB MSC Symbols Defined
MSC

## Defines
#define | CSL_MSC_CBW_0 (1)
| USB MSC Command Block Word definitions.
#define | CSL_MSC_CBW_1 (2)
#define | CSL_MSC_CBW_2 (3)
#define | CSL_MSC_CBW_3 (4)
#define | CSL_MSC_CBW_4 (5)
#define | CSL_MSC_CBW_5 (6)
#define | CSL_MSC_CBW_6 (7)
#define | CSL_MSC_CBW_7 (8)
#define | CSL_MSC_CBW_8 (9)
#define | CSL_MSC_CBW_9 (10)
#define | CSL_MSC_CBW_10 (11)
#define | CSL_MSC_CBW_11 (12)
#define | CSL_MSC_CBW_12 (13)
#define | CSL_MSC_CBW_13 (14)
#define | CSL_MSC_CBW_14 (15)
#define | CSL_MSC_CBW_15 (16)
#define | CSL_MSC_CSW_2 (3)
| USB MSC Command Status Word definitions.
#define | CSL_MSC_CSW_3 (4)
#define | CSL_MSC_CSW_4 (5)
#define | CSL_MSC_CSW_5 (6)
#define | CSL_MSC_CSW_6 (7)
#define | CSL_MSC_CBW_SIGNATURE (0x43425355)
#define | CSL_MSC_CSW_SIGNATURE (0x53425355)
#define | CSL_MSC_CBW_DATADIR_IN (0x80)
#define | CSL_MSC_CBW_DATADIR_OUT (0x0)
#define | CSL_MSC_CBW_DIRBIT_MASK (0x80)
#define | CSL_MSC_MEDIA_PRESENT (0x1)
| USB MSC media state definitions.
#define | CSL_MSC_MEDIA_LOCKED (0x2)
#define | CSL_MSC_MEDIA_WRITEPENDING (0x4)
#define | CSL_MSC_MEDIA_BAD (0x8)
#define | CSL_MSC_MEDIA_WRITEENABLE (0x0001)
#define | CSL_MSC_DEVICE_DESCRIPTOR_TYPE (0x01)
| USB MSC Descriptor Type Values.
#define | CSL_MSC_DEVICE_QUAL_DESCRIPTOR_TYPE (0x06)
#define | CSL_MSC_CONFIGURATION_DESCRIPTOR_TYPE (0x02)
#define | CSL_MSC_OTHERSPEED_CFG_DESCRIPTOR_TYPE (0x07)
#define | CSL_MSC_STRING_DESCRIPTOR_TYPE (0x03)
#define | CSL_MSC_INTERFACE_DESCRIPTOR_TYPE (0x04)
#define | CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE (0x05)
#define | CSL_MSC_POWER_DESCRIPTOR_TYPE (0x06)
#define | CSL_MSC_HID_DESCRIPTOR_TYPE (0x21)
#define | CSL_MSC_FEATURE_ENDPOINT_STALL (0x0000)
| USB MSC Defined Feature selectors.
#define | CSL_MSC_FEATURE_REMOTE_WAKEUP (0x0001)
#define | CSL_MSC_VERIFY_PASSED (0x0)
| USB MSC status and size definitions.
#define | CSL_MSC_VERIFY_FAILED (0x1)
#define | CSL_MSC_UNIT_REMOVEABLE (0x1)
#define | CSL_MSC_CURRDEV_STAT (0x01)
#define | CSL_MSC_CURRINTRF_STAT (0x00)
#define | CSL_MSC_NO_ENDPTOBJECT (5)
#define | CSL_MSC_DEVDESC_LEN (10)
#define | CSL_MSC_CFGDESC_TOTAL_LEN (17)
#define | CSL_MSC_DEVQUALDESC_LEN (6)
#define | CSL_MSC_CONFDESC_LEN (6)
#define | CSL_MSC_MS_INTDESC_LEN (6)
#define | CSL_MSC_MS_BULKOUT_ENDPTDESC_LEN (5)
#define | CSL_MSC_MS_BULKIN_ENDPTDESC_LEN (5)
#define | CSL_MSC_STRDESC_LANGID_LEN (4)
#define | CSL_MSC_SCSI_INQUIRY_LEN (50)
#define | CSL_MSC_SENSEDATA_LEN (15)
#define | CSL_MSC_LUN_MAX (4)
#define | CSL_MSC_CBWSIZE (17)
#define | CSL_MSC_CSWSIZE (8)
#define | CSL_MSC_READCAP (6)
#define | CSL_MSC_CTRLBUFF_LEN (5)
#define | CSL_MSC_SCSI_INQUIRY_CONF_LEN (24)
#define | CSL_MSC_DEVICE_CLASS_STORAGE (0x08)
#define | CSL_MSC_SCSI_DATA_PROTECT (0x0007)
#define | CSL_MSC_REQUEST_GET_STATUS (0x8000)
| Symbolic constants for USB MSC requests.
#define | CSL_MSC_REQUEST_CLEAR_FEATURE (0x0001)
#define | CSL_MSC_REQUEST_SET_FEATURE (0x0003)
#define | CSL_MSC_REQUEST_SET_ADDRESS (0x0005)
#define | CSL_MSC_REQUEST_GET_DESCRIPTOR (0x8006)
#define | CSL_MSC_REQUEST_SET_DESCRIPTOR (0x0007)
#define | CSL_MSC_REQUEST_GET_CONFIGURATION (0x8008)
#define | CSL_MSC_REQUEST_SET_CONFIGURATION (0x0009)
#define | CSL_MSC_REQUEST_GET_INTERFACE (0x800A)
#define | CSL_MSC_REQUEST_SET_INTERFACE (0x000B)
#define | CSL_MSC_REQUEST_SYNC_FRAME (0x800C)
#define | CSL_MSC_REQUEST_BOT_MSC_RESET (0x20FF)
#define | CSL_MSC_REQUEST_GET_MAX_LUN (0xA0FE)
#define | CSL_MSC_REQUEST_TYPE_BASE (0x80)
#define | CSL_MSC_REQUEST_TYPE_DEVICE_STATUS (0x0)
#define | CSL_MSC_REQUEST_TYPE_INTERFACE_STATUS (0x1)
#define | CSL_MSC_REQUEST_TYPE_EP_STATUS (0x2)
#define | CSL_MSC_DEVICE_SUSPENDED (0x01)
| MSC Status query API return values.
#define | CSL_MSC_DEVICE_NOT_SUSPENDED (0x0)
#define | CSL_MSC_LUN_LOCKED (0x01)
#define | CSL_MSC_LUN_NOT_LOCKED (0x0)
#define | CSL_MSC_ACTIVITY_PRESENT (0x01)
#define | CSL_MSC_ACTIVITY_NOT_PRESENT (0x0)
#define | CSL_MSC_16BIT_MASK (0xFFFF)
#define | CSL_MSC_16BIT_SHIFT (16)
#define | CSL_MSC_24BIT_SHIFT (24)
#define | CSL_MSC_8BIT_MASK (0xFF)
#define | CSL_MSC_8BIT_HIGH_MASK (0xFF00)
#define | CSL_MSC_8BIT_SHIFT (8)
#define | CSL_MSC_UNICODE_SIZE (66)
#define | CSL_MSC_DEVICE_DESC_DEFLEN (18)
#define | CSL_MSC_DEVICE_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_DEVICE_DESC2_DEFVAL (0x0200)
#define | CSL_MSC_DEVICE_DESC3_DEFVAL (0x0000)
#define | CSL_MSC_DEVICE_DESC4_DEFVAL (0x4000)
#define | CSL_MSC_DEVICE_DESC5_DEFVAL (0x0451)
#define | CSL_MSC_DEVICE_DESC6_DEFVAL (0x9010)
#define | CSL_MSC_DEVICE_DESC7_DEFVAL (0x0001)
#define | CSL_MSC_DEVICE_DESC8_DEFVAL (0x0201)
#define | CSL_MSC_DEVICE_DESC9_DEFVAL (0x0103)
#define | CSL_MSC_DEVICE_QUAL_DESC_DEFLEN (10)
#define | CSL_MSC_DEVICE_QUAL_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_DEVICE_QUAL_DESC2_DEFVAL (0x0200)
#define | CSL_MSC_DEVICE_QUAL_DESC3_DEFVAL (0x0000)
#define | CSL_MSC_DEVICE_QUAL_DESC4_DEFVAL (0x4000)
#define | CSL_MSC_DEVICE_QUAL_DESC5_DEFVAL (0x0001)
#define | CSL_MSC_CONF_DESC_DEFLEN (9)
#define | CSL_MSC_CONF_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_CONF_DESC2_DEFVAL (32)
#define | CSL_MSC_CONF_DESC3_DEFVAL (0x0101)
#define | CSL_MSC_CONF_DESC4_DEFVAL (0xC004)
#define | CSL_MSC_CONF_DESC5_DEFVAL (50)
#define | CSL_MSC_INTERFACE_DESC_DEFLEN (9)
#define | CSL_MSC_INTERFACE_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_INTERFACE_DESC2_DEFVAL (0x0000)
#define | CSL_MSC_INTERFACE_DESC3_DEFVAL ((CSL_MSC_DEVICE_CLASS_STORAGE<<8) | 2)
#define | CSL_MSC_INTERFACE_DESC4_DEFVAL (0x5006)
#define | CSL_MSC_INTERFACE_DESC5_DEFVAL (0x05)
#define | CSL_MSC_BULKOUTEP_DESC_DEFLEN (7)
#define | CSL_MSC_BULKOUTEP_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_BULKOUTEP_DESC2_DEFVAL (0x0202)
#define | CSL_MSC_BULKOUTEP_DESC3_DEFVAL (0x0040)
#define | CSL_MSC_BULKOUTEP_DESC4_DEFVAL (0x00)
#define | CSL_MSC_BULKINEP_DESC_DEFLEN (7)
#define | CSL_MSC_BULKINEP_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_BULKINEP_DESC2_DEFVAL (0x0282)
#define | CSL_MSC_BULKINEP_DESC3_DEFVAL (0x0040)
#define | CSL_MSC_BULKINEP_DESC4_DEFVAL (0x00)
#define | CSL_MSC_HS_CFG_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_HS_CFG_DESC2_DEFVAL (32)
#define | CSL_MSC_HS_CFG_DESC3_DEFVAL (0x0101)
#define | CSL_MSC_HS_CFG_DESC4_DEFVAL (0xC004)
#define | CSL_MSC_HS_CFG_DESC5_DEFVAL (0x0932)
#define | CSL_MSC_HS_CFG_DESC6_DEFVAL (CSL_MSC_INTERFACE_DESCRIPTOR_TYPE)
#define | CSL_MSC_HS_CFG_DESC7_DEFVAL (0x0200)
#define | CSL_MSC_HS_CFG_DESC8_DEFVAL (0x0600 | CSL_MSC_DEVICE_CLASS_STORAGE)
#define | CSL_MSC_HS_CFG_DESC9_DEFVAL (0x0550)
#define | CSL_MSC_HS_CFG_DESC10_DEFVAL ((CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE<<8) | 7)
#define | CSL_MSC_HS_CFG_DESC11_DEFVAL (0x0202)
#define | CSL_MSC_HS_CFG_DESC12_DEFVAL (0x0200)
#define | CSL_MSC_HS_CFG_DESC13_DEFVAL (0x0700)
#define | CSL_MSC_HS_CFG_DESC14_DEFVAL (0x8100 | CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE)
#define | CSL_MSC_HS_CFG_DESC15_DEFVAL (0x0002)
#define | CSL_MSC_HS_CFG_DESC16_DEFVAL (0x0002)
#define | CSL_MSC_FS_CFG_DESC0_DEFVAL (0x0000)
#define | CSL_MSC_FS_CFG_DESC2_DEFVAL (32)
#define | CSL_MSC_FS_CFG_DESC3_DEFVAL (0x0101)
#define | CSL_MSC_FS_CFG_DESC4_DEFVAL (0xC004)
#define | CSL_MSC_FS_CFG_DESC5_DEFVAL (0x0932)
#define | CSL_MSC_FS_CFG_DESC6_DEFVAL (CSL_MSC_INTERFACE_DESCRIPTOR_TYPE)
#define | CSL_MSC_FS_CFG_DESC7_DEFVAL (0x0200)
#define | CSL_MSC_FS_CFG_DESC8_DEFVAL (0x0600 | CSL_MSC_DEVICE_CLASS_STORAGE)
#define | CSL_MSC_FS_CFG_DESC9_DEFVAL (0x0550)
#define | CSL_MSC_FS_CFG_DESC10_DEFVAL ((CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE<<8) | 7)
#define | CSL_MSC_FS_CFG_DESC11_DEFVAL (0x0202)
#define | CSL_MSC_FS_CFG_DESC12_DEFVAL (0x0040)
#define | CSL_MSC_FS_CFG_DESC13_DEFVAL (0x0700)
#define | CSL_MSC_FS_CFG_DESC14_DEFVAL (0x8100 | CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE)
#define | CSL_MSC_FS_CFG_DESC15_DEFVAL (0x4002)
#define | CSL_MSC_FS_CFG_DESC16_DEFVAL (0x0000)
#define | CSL_MSC_LANGID_DEFLEN (4)
#define | CSL_MSC_LANGID0_DEFVAL (0x0000)
#define | CSL_MSC_LANGID2_DEFVAL (0x0409)
#define | CSL_MSC_LANGID3_DEFVAL (0x0000)
#define | CSL_MSC_SENSE_DATA0_DEFVAL (26)
#define | CSL_MSC_SENSE_DATA1_DEFVAL (0)
#define | CSL_MSC_SENSE_DATA2_DEFVAL (0x0070)
#define | CSL_MSC_SENSE_DATA3_DEFVAL (0x0000)
#define | CSL_MSC_SENSE_DATA4_DEFVAL (0x0000)
#define | CSL_MSC_SENSE_DATA5_DEFVAL ((11<<8) | 0)
#define | CSL_MSC_MODESENSE_DATA0_DEFVAL (0x08)
#define | CSL_MSC_MODESENSE_DATA1_DEFVAL (0x0)
#define | CSL_MSC_MODESENSE_DATA2_DEFVAL (0x03)
#define | CSL_MSC_MODESENSE_DATA3_DEFVAL (0x0)
#define | CSL_MSC_MODESENSE_DATA4_DEFVAL (0x0)
#define | CSL_MSC_READ_CAPACITY0_DEFVAL (8)
#define | CSL_MSC_CSW0_DEFVAL (0)
#define | CSL_MSC_CSW1_DEFVAL (0x5355)
#define | CSL_MSC_CSW2_DEFVAL (0x5342)
#define | CSL_MSC_STORAGE_STATE_RESET (0)
| MSC Storage state macros.
#define | CSL_MSC_STORAGE_STATE_WAIT_FOR_CBW (1)
#define | CSL_MSC_STORAGE_STATE_SENDING_STALL (2)
#define | CSL_MSC_STORAGE_STATE_SENDING_DATA (3)
#define | CSL_MSC_STORAGE_STATE_SENDING_CSW (4)
#define | CSL_MSC_STORAGE_STATE_READ (5)
#define | CSL_MSC_STORAGE_STATE_WRITE (6)
#define | CSL_MSC_STORAGE_STATE_SENDING_SHORT_PKT (7)
#define | CSL_MSC_STATE_RESET_DATA_SIZE (31)
#define | CSL_MSC_CBW_DATA_SIZE (31)
#define | CSL_MSC_CSW_DATA_SIZE (13)
#define | CSL_MSC_SCSI_COMMAND_TEST_UNIT_READY (0x00)
| MSC SCSI commands.
#define | CSL_MSC_SCSI_COMMAND_REQUEST_SENSE (0x03)
#define | CSL_MSC_SCSI_COMMAND_FORMAT_UNIT (0x04)
#define | CSL_MSC_SCSI_COMMAND_INQUIRY (0x12)
#define | CSL_MSC_SCSI_COMMAND_MODE_SELECT_6 (0x15)
#define | CSL_MSC_SCSI_COMMAND_RESERVE_6 (0x16)
#define | CSL_MSC_SCSI_COMMAND_RELEASE_6 (0x17)
#define | CSL_MSC_SCSI_COMMAND_MODE_SENSE_6 (0x1A)
#define | CSL_MSC_SCSI_COMMAND_MODE_SENSE_10 (0x5A)
#define | CSL_MSC_SCSI_COMMAND_START_STOP_UNIT (0x1B)
#define | CSL_MSC_SCSI_COMMAND_PREVENT_ALLOW_MEDIA_REMOVAL (0x1E)
#define | CSL_MSC_SCSI_COMMAND_READ_CAPACITY (0x25)
#define | CSL_MSC_SCSI_COMMAND_READ_10 (0x28)
#define | CSL_MSC_SCSI_COMMAND_WRITE_10 (0x2A)
#define | CSL_MSC_SCSI_COMMAND_VERIFY_10 (0x2F)
#define | CSL_MSC_SCSI_COMMAND_SYNCHRONIZE_CACHE (0x35)
#define | CSL_MSC_SCSI_COMMAND_WRITE_BUFFER (0x3B)
#define | CSL_MSC_SCSI_COMMAND_PERSISTENT_RESERVE_IN (0x5E)
#define | CSL_MSC_SCSI_COMMAND_PERSISTENT_RESERVE_OUT (0x5F)
#define | CSL_MSC_SCSI_SENSEKEY_NO_SENSE (0x00)
| MSC SCSI sense keys.
#define | CSL_MSC_SCSI_SENSEKEY_RECOVERED_ERROR (0x01)
#define | CSL_MSC_SCSI_SENSEKEY_NOT_READY (0x02)
#define | CSL_MSC_SCSI_SENSEKEY_MEDIA_ERROR (0x03)
#define | CSL_MSC_SCSI_SENSEKEY_HARDWARE_ERROR (0x04)
#define | CSL_MSC_SCSI_SENSEKEY_ILLEGAL_REQUEST (0x05)
#define | CSL_MSC_SCSI_SENSEKEY_UNIT_ATTENTION (0x06)
#define | CSL_MSC_SCSI_SENSEKEY_DATA_PROTECT (0x07)
#define | CSL_MSC_SCSI_SENSEKEY_BLANK_CHECK (0x08)
#define | CSL_MSC_SCSI_SENSEKEY_VENDOR_SPECIFIC (0x09)
#define | CSL_MSC_SCSI_SENSEKEY_COPY_ABORTED (0x0A)
#define | CSL_MSC_SCSI_SENSEKEY_ABORTED_COMMAND (0x0B)
#define | CSL_MSC_SCSI_SENSEKEY_EQUAL (0x0C)
#define | CSL_MSC_SCSI_SENSEKEY_VOLUME_OVERFLOW (0x0D)
#define | CSL_MSC_SCSI_SENSEKEY_MISCOMPARE (0x0E)
#define | CSL_MSC_SCSI_SENSEKEY_RESERVED (0x0F)
#define | CSL_MSC_SCSI_ASC_MISCOMPARE_VERIFY (0x001D)
#define | CSL_MSC_SCSI_ASC_NO_ADDITIONAL_SENSE_INFORMATION (0x0000)
| MSC SCSI additional sense keys.
#define | CSL_MSC_SCSI_ASC_MEDIA_NOT_PRESENT (0x003A)
#define | CSL_MSC_SCSI_ASC_INVALID_COMMAND_OPERATION_CODE (0x0020)
#define | CSL_MSC_SCSI_ASC_MEDIA_MAY_HAVE_CHANGED (0x0028)
#define | CSL_MSC_SCSI_ASC_MEDIA_MANUALINTERVENTION_REQUIRED (0x0004)
#define | CSL_MSC_SCSI_ASC_MEDIA_OUTOFRANGE (0x0021)
#define | CSL_MSC_SCSI_ASC_WRITE_PROTECTED (0x0027)
#define | CSL_MSC_SCSI_ASC_MEDIA_REMOVAL_PREVENTED (0x0253)
#define | CSL_MSC_CSW_STATUS_COMMAND_PASSED (0x00)
| MSC CSW status macros.
#define | CSL_MSC_CSW_STATUS_COMMAND_FAILED (0x01)
#define | CSL_MSC_CSW_STATUS_PHASE_ERROR (0x02)
#define | CSL_MSC_RC_1 (2)
#define | CSL_MSC_RC_2 (3)
#define | CSL_MSC_RC_3 (4)
#define | CSL_MSC_RC_4 (5)
#define | CSL_MSC_SSD_2 (3)
#define | CSL_MSC_SSD_7 (8)
#define | CSL_SCSI_DATA0_DEFVAL (96)
#define | CSL_SCSI_DATA1_DEFVAL (0x0)
#define | CSL_SCSI_DATA2_DEFVAL (0x8000)
#define | CSL_SCSI_DATA3_DEFVAL (0x0200)
#define | CSL_SCSI_DATA4_DEFVAL (92)
#define | CSL_SCSI_DATA5_DEFVAL (0x0000)
#define | CSL_SCSI_DATA30_DEFVAL (0x0000)
#define | CSL_SCSI_DATA31_DEFVAL (0x2002)
#define | CSL_SCSI_DATA32_DEFVAL (0x3802)
#define | CSL_SCSI_DATA_NULL_VAL (0x0000)
#define | CSL_SCSI_DATA_SIZE1 (6)
#define | CSL_SCSI_DATA_SIZE2 (30)
#define | CSL_SCSI_DATA_SIZE3 (33)
#define | CSL_SCSI_DATA_SIZE4 (50)
#define | CSL_MSC_ERROR_BASE (CSL_EUSB_FIRST)
#define | CSL_MSC_INVALID_REQUEST_HANDLER (CSL_MSC_ERROR_BASE - 1)
#define | CSL_MSC_REQUEST_ARGS
| MSC Request arguments.

## Define Documentation

#define CSL_MSC_16BIT_MASK (0xFFFF)

MSC 16 bit Mask value

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_16BIT_SHIFT (16)

MSC 16 bit shift value

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), MSC_sendCswWithPhaseError(), and MSC_verifyCBW().

#define CSL_MSC_24BIT_SHIFT (24)

MSC 24 bit shift value

Referenced by MSC_ExecuteRead(), and MSC_ExecuteWrite().

#define CSL_MSC_8BIT_HIGH_MASK (0xFF00)

MSC 8 bit Mask value

Referenced by MSC_HandleVerify10().

#define CSL_MSC_8BIT_MASK (0xFF)

MSC 8 bit Mask value

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleVerify10(), MSC_reqClearFeature(), MSC_reqGetDescriptor(), and MSC_reqSetFeature().

#define CSL_MSC_8BIT_SHIFT (8)

MSC 8 bit shift value

Referenced by MSC_Bulk(), MSC_Ctrl(), MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), MSC_HandleStateWaitForCBW(), MSC_HandleVerify10(), MSC_initCtrlDesc(), MSC_reqGetDescriptor(), and MSC_verifyCBW().

#define CSL_MSC_ACTIVITY_NOT_PRESENT (0x0)

Return value for activity not present case

#define CSL_MSC_ACTIVITY_PRESENT (0x01)

Return value for activity present case

#define CSL_MSC_BULKINEP_DESC0_DEFVAL (0x0000)

Default value for element 0 in bulk in end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKINEP_DESC2_DEFVAL (0x0282)

Default value for element 2 in bulk in end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKINEP_DESC3_DEFVAL (0x0040)

Default value for element 3 in bulk in end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKINEP_DESC4_DEFVAL (0x00)

Default value for element 4 in bulk in end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKINEP_DESC_DEFLEN (7)

Bulk In end point descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKOUTEP_DESC0_DEFVAL (0x0000)

Default value for element 0 in bulk out end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKOUTEP_DESC2_DEFVAL (0x0202)

Default value for element 2 in bulk out end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKOUTEP_DESC3_DEFVAL (0x0040)

Default value for element 3 in bulk out end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKOUTEP_DESC4_DEFVAL (0x00)

Default value for element 4 in bulk out end point descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_BULKOUTEP_DESC_DEFLEN (7)

Bulk Out end point descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CBW_0 (1)

USB MSC Command Block Word definitions.

USB MSC Command Block Word 0

Referenced by MSC_verifyCBW().

#define CSL_MSC_CBW_1 (2)

USB MSC Command Block Word 1

Referenced by MSC_verifyCBW().

#define CSL_MSC_CBW_10 (11)

USB MSC Command Block Word 10

Referenced by MSC_ExecuteRead(), and MSC_ExecuteWrite().

#define CSL_MSC_CBW_11 (12)

USB MSC Command Block Word 11

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), and MSC_HandleVerify10().

#define CSL_MSC_CBW_12 (13)

USB MSC Command Block Word 12

#define CSL_MSC_CBW_13 (14)

USB MSC Command Block Word 13

#define CSL_MSC_CBW_14 (15)

USB MSC Command Block Word 14

#define CSL_MSC_CBW_15 (16)

USB MSC Command Block Word 15

#define CSL_MSC_CBW_2 (3)

USB MSC Command Block Word 2

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CBW_3 (4)

USB MSC Command Block Word 3

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CBW_4 (5)

USB MSC Command Block Word 4

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CBW_5 (6)

USB MSC Command Block Word 5

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CBW_6 (7)

USB MSC Command Block Word 6

Referenced by MSC_Bulk(), MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), and MSC_verifyCBW().

#define CSL_MSC_CBW_7 (8)

USB MSC Command Block Word 7

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CBW_8 (9)

USB MSC Command Block Word 8

Referenced by MSC_ExecuteRead(), and MSC_ExecuteWrite().

#define CSL_MSC_CBW_9 (10)

USB MSC Command Block Word 9

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), and MSC_HandleStartStopUnit().

#define CSL_MSC_CBW_DATA_SIZE (31)

Command Block Word length in bytes

Referenced by MSC_HandleStateSendCSW(), and MSC_verifyCBW().

#define CSL_MSC_CBW_DATADIR_IN (0x80)

Value of CBW flag byte for DATA IN transaction

Referenced by MSC_ExecuteRead(), MSC_handleDataDirMisMatch(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), and MSC_HandleRequestSense().

#define CSL_MSC_CBW_DATADIR_OUT (0x0)

Value of CBW flag byte for DATA OUT transaction

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_CBW_DIRBIT_MASK (0x80)

Mask for direction bit in CBW flags

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), and MSC_HandleRequestSense().

#define CSL_MSC_CBW_SIGNATURE (0x43425355)

Valid signature for CBW

Referenced by MSC_verifyCBW().

#define CSL_MSC_CBWSIZE (17)

Command block word size in words

#define CSL_MSC_CFGDESC_TOTAL_LEN (17)

Configuration descriptor length in words

#define CSL_MSC_CONF_DESC0_DEFVAL (0x0000)

Default value for element 0 in configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CONF_DESC2_DEFVAL (32)

Default value for element 2 in configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CONF_DESC3_DEFVAL (0x0101)

Default value for element 3 in configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CONF_DESC4_DEFVAL (0xC004)

Default value for element 4 in configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CONF_DESC5_DEFVAL (50)

Default value for element 5 in configuration descriptor array

#define CSL_MSC_CONF_DESC_DEFLEN (9)

Configuration descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CONFDESC_LEN (6)

Configuration descriptor length in words

#define CSL_MSC_CONFIGURATION_DESCRIPTOR_TYPE (0x02)

USB MSC configuration descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_CSW0_DEFVAL (0)

Command status word 0 default value

Referenced by MSC_initMscVal().

#define CSL_MSC_CSW1_DEFVAL (0x5355)

Command status word 1 default value

Referenced by MSC_initMscVal().

#define CSL_MSC_CSW2_DEFVAL (0x5342)

Command status word 2 default value

Referenced by MSC_initMscVal().

#define CSL_MSC_CSW_2 (3)

USB MSC Command Status Word definitions.

USB MSC Command Status Word 2

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CSW_3 (4)

USB MSC Command Status Word 3

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_CSW_4 (5)

USB MSC Command Status Word 4

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_CSW_5 (6)

USB MSC Command Status Word 5

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStateWaitForCBW(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_CSW_6 (7)

USB MSC Command Status Word 6

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_handleDataDirMisMatch(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStartStopUnit(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), MSC_HandleVerify10(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_CSW_DATA_SIZE (13)

Command Status Word length in bytes

Referenced by MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStateSendData(), MSC_HandleStateSendStall(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), MSC_HandleVerify10(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_CSW_SIGNATURE (0x53425355)

Valid signature for CSW

#define CSL_MSC_CSW_STATUS_COMMAND_FAILED (0x01)

CSW status command failed

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), and MSC_HandleVerify10().

#define CSL_MSC_CSW_STATUS_COMMAND_PASSED (0x00)

MSC CSW status macros.

CSW status command passed

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleRequestSense(), MSC_HandleStartStopUnit(), MSC_HandleTestUnitReady(), and MSC_HandleVerify10().

#define CSL_MSC_CSW_STATUS_PHASE_ERROR (0x02)

CSW status phase error

Referenced by MSC_handleDataDirMisMatch(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_CSWSIZE (8)

Command status word size in words

#define CSL_MSC_CTRLBUFF_LEN (5)

Control buffer length in words

#define CSL_MSC_CURRDEV_STAT (0x01)

Current USB device status

Referenced by MSC_reqGetStatus().

#define CSL_MSC_CURRINTRF_STAT (0x00)

Current USB interface status

#define CSL_MSC_DEVDESC_LEN (10)

Device descriptor length in words

#define CSL_MSC_DEVICE_CLASS_STORAGE (0x08)

Mass storage call definition macro

#define CSL_MSC_DEVICE_DESC0_DEFVAL (0x0000)

Default value for element 0 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC2_DEFVAL (0x0200)

Default value for element 2 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC3_DEFVAL (0x0000)

Default value for element 3 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC4_DEFVAL (0x4000)

Default value for element 4 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC5_DEFVAL (0x0451)

Default value for element 5 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC6_DEFVAL (0x9010)

Default value for element 6 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC7_DEFVAL (0x0001)

Default value for element 7 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC8_DEFVAL (0x0201)

Default value for element 8 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC9_DEFVAL (0x0103)

Default value for element 9 in device descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESC_DEFLEN (18)

Device descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_DESCRIPTOR_TYPE (0x01)

USB MSC Descriptor Type Values.

USB MSC device descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_NOT_SUSPENDED (0x0)

Return value for USB device not suspended case

#define CSL_MSC_DEVICE_QUAL_DESC0_DEFVAL (0x0000)

Default value for element 0 in device qualifier descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESC2_DEFVAL (0x0200)

Default value for element 2 in device qualifier descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESC3_DEFVAL (0x0000)

Default value for element 3 in device qualifier descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESC4_DEFVAL (0x4000)

Default value for element 4 in device qualifier descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESC5_DEFVAL (0x0001)

Default value for element 5 in device qualifier descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESC_DEFLEN (10)

Device qualifier descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_QUAL_DESCRIPTOR_TYPE (0x06)

USB MSC device qualifier descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_DEVICE_SUSPENDED (0x01)

MSC Status query API return values.

Return value for USB device suspended case

#define CSL_MSC_DEVQUALDESC_LEN (6)

Device qualifier descriptor length in words

#define CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE (0x05)

USB MSC end point descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_ERROR_BASE (CSL_EUSB_FIRST)

Error Code base

#define CSL_MSC_FEATURE_ENDPOINT_STALL (0x0000)

USB MSC Defined Feature selectors.

Msc host request to set/clear end point stall

#define CSL_MSC_FEATURE_REMOTE_WAKEUP (0x0001)

Msc host request to set/reset remote wakeup feature

#define CSL_MSC_FS_CFG_DESC0_DEFVAL (0x0000)

Default value for element 0 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC10_DEFVAL ((CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE<<8) | 7)

Default value for element 10 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC11_DEFVAL (0x0202)

Default value for element 11 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC12_DEFVAL (0x0040)

Default value for element 12 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC13_DEFVAL (0x0700)

Default value for element 13 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC14_DEFVAL (0x8100 | CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE)

Default value for element 14 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC15_DEFVAL (0x4002)

Default value for element 15 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC16_DEFVAL (0x0000)

Default value for element 16 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC2_DEFVAL (32)

Default value for element 2 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC3_DEFVAL (0x0101)

Default value for element 3 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC4_DEFVAL (0xC004)

Default value for element 4 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC5_DEFVAL (0x0932)

Default value for element 5 in fullspeed configuration descriptor array

#define CSL_MSC_FS_CFG_DESC6_DEFVAL (CSL_MSC_INTERFACE_DESCRIPTOR_TYPE)

Default value for element 6 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC7_DEFVAL (0x0200)

Default value for element 7 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC8_DEFVAL (0x0600 | CSL_MSC_DEVICE_CLASS_STORAGE)

Default value for element 8 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_FS_CFG_DESC9_DEFVAL (0x0550)

Default value for element 9 in fullspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HID_DESCRIPTOR_TYPE (0x21)

USB MSC Human Interface Device descriptor type macro

#define CSL_MSC_HS_CFG_DESC0_DEFVAL (0x0000)

Default value for element 0 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC10_DEFVAL ((CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE<<8) | 7)

Default value for element 10 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC11_DEFVAL (0x0202)

Default value for element 11 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC12_DEFVAL (0x0200)

Default value for element 12 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC13_DEFVAL (0x0700)

Default value for element 13 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC14_DEFVAL (0x8100 | CSL_MSC_ENDPOINT_DESCRIPTOR_TYPE)

Default value for element 14 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC15_DEFVAL (0x0002)

Default value for element 15 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC16_DEFVAL (0x0002)

Default value for element 16 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC2_DEFVAL (32)

Default value for element 2 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC3_DEFVAL (0x0101)

Default value for element 3 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC4_DEFVAL (0xC004)

Default value for element 4 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC5_DEFVAL (0x0932)

Default value for element 5 in highspeed configuration descriptor array

#define CSL_MSC_HS_CFG_DESC6_DEFVAL (CSL_MSC_INTERFACE_DESCRIPTOR_TYPE)

Default value for element 6 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC7_DEFVAL (0x0200)

Default value for element 7 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC8_DEFVAL (0x0600 | CSL_MSC_DEVICE_CLASS_STORAGE)

Default value for element 8 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_HS_CFG_DESC9_DEFVAL (0x0550)

Default value for element 9 in highspeed configuration descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC0_DEFVAL (0x0000)

Default value for element 0 in interface descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC2_DEFVAL (0x0000)

Default value for element 2 in interface descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC3_DEFVAL ((CSL_MSC_DEVICE_CLASS_STORAGE<<8) | 2)

Default value for element 3 in interface descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC4_DEFVAL (0x5006)

Default value for element 4 in interface descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC5_DEFVAL (0x05)

Default value for element 5 in interface descriptor array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESC_DEFLEN (9)

Interface descriptor length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INTERFACE_DESCRIPTOR_TYPE (0x04)

USB MSC interface descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_INVALID_REQUEST_HANDLER (CSL_MSC_ERROR_BASE - 1)

Returned when the MSC request handler is invalid

Referenced by MSC_Ctrl().

#define CSL_MSC_LANGID0_DEFVAL (0x0000)

Default value for element 0 in string descriptor language Id array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_LANGID2_DEFVAL (0x0409)

Default value for element 2 in string descriptor language Id array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_LANGID3_DEFVAL (0x0000)

Default value for element 3 in string descriptor language Id array

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_LANGID_DEFLEN (4)

String descriptor language Id length in bytes

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_LUN_LOCKED (0x01)

Return value for Logical unit locked case

#define CSL_MSC_LUN_MAX (4)

Maximum logical unit number

#define CSL_MSC_LUN_NOT_LOCKED (0x0)

Return value for Logical unit not locked case

#define CSL_MSC_MEDIA_BAD (0x8)

Bad storage media

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), MSC_HandleTestUnitReady(), and MSC_Setup().

#define CSL_MSC_MEDIA_LOCKED (0x2)

Storage media locked

Referenced by MSC_GetLunLockedStatus(), MSC_HandlePreventAllowMediaRemoval(), and MSC_HandleStartStopUnit().

#define CSL_MSC_MEDIA_PRESENT (0x1)

USB MSC media state definitions.

Storage media available for the operations

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), MSC_HandleTestUnitReady(), and MSC_Setup().

#define CSL_MSC_MEDIA_WRITEENABLE (0x0001)

Enable Storage media write

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_MEDIA_WRITEPENDING (0x4)

Storage media write operation is in pending

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_MODESENSE_DATA0_DEFVAL (0x08)

Default value for element 0 in mode sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_MODESENSE_DATA1_DEFVAL (0x0)

Default value for element 1 in mode sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_MODESENSE_DATA2_DEFVAL (0x03)

Default value for element 2 in mode sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_MODESENSE_DATA3_DEFVAL (0x0)

Default value for element 3 in mode sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_MODESENSE_DATA4_DEFVAL (0x0)

Default value for element 4 in mode sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_MS_BULKIN_ENDPTDESC_LEN (5)

Bulk in end point descriptor length in words

#define CSL_MSC_MS_BULKOUT_ENDPTDESC_LEN (5)

Bulk out end point descriptor length in words

#define CSL_MSC_MS_INTDESC_LEN (6)

Interface descriptor length in words

#define CSL_MSC_NO_ENDPTOBJECT (5)

No end point object is available

#define CSL_MSC_OTHERSPEED_CFG_DESCRIPTOR_TYPE (0x07)

USB MSC other speed configuration descriptor type

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_POWER_DESCRIPTOR_TYPE (0x06)

USB MSC power descriptor type macro

#define CSL_MSC_RC_1 (2)

Read capacity word 1

Referenced by MSC_HandleReadCapacity().

#define CSL_MSC_RC_2 (3)

Read capacity word 2

Referenced by MSC_HandleReadCapacity().

#define CSL_MSC_RC_3 (4)

Read capacity word 3

Referenced by MSC_HandleReadCapacity().

#define CSL_MSC_RC_4 (5)

Read capacity word 4

Referenced by MSC_HandleReadCapacity().

#define CSL_MSC_READ_CAPACITY0_DEFVAL (8)

Read capacity 0 default value

Referenced by MSC_initMscVal().

#define CSL_MSC_READCAP (6)

MSC read capacity

#define CSL_MSC_REQUEST_ARGS

Value:

    CSL_UsbDevNum         devNum,           \
                                     CSL_UsbSetupStruct    *usbSetup,        \
                                     pUsbEpHandle          hInEp,            \
                                     pUsbEpHandle          hOutEp,           \
                                     void                  *pMsc

MSC Request arguments.

#define CSL_MSC_REQUEST_BOT_MSC_RESET (0x20FF)

Host request for bulk only reset

#define CSL_MSC_REQUEST_CLEAR_FEATURE (0x0001)

Host request to clear feature

#define CSL_MSC_REQUEST_GET_CONFIGURATION (0x8008)

Host request to get configuration

#define CSL_MSC_REQUEST_GET_DESCRIPTOR (0x8006)

Host request to get descriptor

#define CSL_MSC_REQUEST_GET_INTERFACE (0x800A)

Host request to get interface

#define CSL_MSC_REQUEST_GET_MAX_LUN (0xA0FE)

Host request to get maximum logical unit number

#define CSL_MSC_REQUEST_GET_STATUS (0x8000)

Symbolic constants for USB MSC requests.

Host request to get status

#define CSL_MSC_REQUEST_SET_ADDRESS (0x0005)

Host request to set address

#define CSL_MSC_REQUEST_SET_CONFIGURATION (0x0009)

Host request to set configuration

#define CSL_MSC_REQUEST_SET_DESCRIPTOR (0x0007)

Host request to set descriptor

#define CSL_MSC_REQUEST_SET_FEATURE (0x0003)

Host request to set feature

#define CSL_MSC_REQUEST_SET_INTERFACE (0x000B)

Host request to set interface

#define CSL_MSC_REQUEST_SYNC_FRAME (0x800C)

Host request for the synchronization frame

#define CSL_MSC_REQUEST_TYPE_BASE (0x80)

Base value for host request to get status

Referenced by MSC_reqGetStatus().

#define CSL_MSC_REQUEST_TYPE_DEVICE_STATUS (0x0)

Host request to get device status

Referenced by MSC_reqGetStatus().

#define CSL_MSC_REQUEST_TYPE_EP_STATUS (0x2)

Host request to get end point status

Referenced by MSC_reqGetStatus().

#define CSL_MSC_REQUEST_TYPE_INTERFACE_STATUS (0x1)

Host request to get interface status

Referenced by MSC_reqGetStatus().

#define CSL_MSC_SCSI_ASC_INVALID_COMMAND_OPERATION_CODE (0x0020)

SCSI sense key invalid command operation code

Referenced by MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), and MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_ASC_MEDIA_MANUALINTERVENTION_REQUIRED (0x0004)

SCSI sense key manual intervention is required for media

Referenced by MSC_ExecuteRead(), and MSC_ExecuteWrite().

#define CSL_MSC_SCSI_ASC_MEDIA_MAY_HAVE_CHANGED (0x0028)

SCSI sense key media may have changed

Referenced by MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_ASC_MEDIA_NOT_PRESENT (0x003A)

SCSI sense key media not present

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), and MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_ASC_MEDIA_OUTOFRANGE (0x0021)

SCSI sense key media out of range

Referenced by MSC_ExecuteRead(), and MSC_ExecuteWrite().

#define CSL_MSC_SCSI_ASC_MEDIA_REMOVAL_PREVENTED (0x0253)

SCSI sense key media removal prevented

Referenced by MSC_HandleStartStopUnit().

#define CSL_MSC_SCSI_ASC_MISCOMPARE_VERIFY (0x001D)

SCSI sense key verify data miss compare

Referenced by MSC_HandleVerify10().

#define CSL_MSC_SCSI_ASC_NO_ADDITIONAL_SENSE_INFORMATION (0x0000)

MSC SCSI additional sense keys.

SCSI no additional sense information

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), and MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_ASC_WRITE_PROTECTED (0x0027)

SCSI sense key media write protected

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_SCSI_COMMAND_FORMAT_UNIT (0x04)

SCSI format the logical unit command

#define CSL_MSC_SCSI_COMMAND_INQUIRY (0x12)

SCSI data inquiry command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_MODE_SELECT_6 (0x15)

SCSI mode select 6 command

#define CSL_MSC_SCSI_COMMAND_MODE_SENSE_10 (0x5A)

SCSI mode sense 10 command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_MODE_SENSE_6 (0x1A)

SCSI mode sense 6 command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_PERSISTENT_RESERVE_IN (0x5E)

SCSI persistent reserve in command

#define CSL_MSC_SCSI_COMMAND_PERSISTENT_RESERVE_OUT (0x5F)

SCSI persistent reserve out command

#define CSL_MSC_SCSI_COMMAND_PREVENT_ALLOW_MEDIA_REMOVAL (0x1E)

SCSI prevent/allow media removal command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_READ_10 (0x28)

SCSI read 10 command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_READ_CAPACITY (0x25)

SCSI read capacity command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_RELEASE_6 (0x17)

SCSI release 6 command

#define CSL_MSC_SCSI_COMMAND_REQUEST_SENSE (0x03)

SCSI request sense command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_RESERVE_6 (0x16)

SCSI reserve 6 command

#define CSL_MSC_SCSI_COMMAND_START_STOP_UNIT (0x1B)

SCSI start/stop logical unit command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_SYNCHRONIZE_CACHE (0x35)

SCSI synchronize cache command

#define CSL_MSC_SCSI_COMMAND_TEST_UNIT_READY (0x00)

MSC SCSI commands.

SCSI test unit ready command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_VERIFY_10 (0x2F)

SCSI verify 10 command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_WRITE_10 (0x2A)

SCSI write 10 command

Referenced by MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_COMMAND_WRITE_BUFFER (0x3B)

SCSI write buffer command

#define CSL_MSC_SCSI_DATA_PROTECT (0x0007)

SCSI data protect macro

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_SCSI_INQUIRY_CONF_LEN (24)

SCSI inquiry configuration length

#define CSL_MSC_SCSI_INQUIRY_LEN (50)

SCSI enquiry data length in words

#define CSL_MSC_SCSI_SENSEKEY_ABORTED_COMMAND (0x0B)

SCSI sense key aborted command

#define CSL_MSC_SCSI_SENSEKEY_BLANK_CHECK (0x08)

SCSI sense key blank check

#define CSL_MSC_SCSI_SENSEKEY_COPY_ABORTED (0x0A)

SCSI sense key copy aborted

#define CSL_MSC_SCSI_SENSEKEY_DATA_PROTECT (0x07)

SCSI sense key data protect

#define CSL_MSC_SCSI_SENSEKEY_EQUAL (0x0C)

SCSI sense key copy equal

#define CSL_MSC_SCSI_SENSEKEY_HARDWARE_ERROR (0x04)

SCSI sense key hardware error has occurred

#define CSL_MSC_SCSI_SENSEKEY_ILLEGAL_REQUEST (0x05)

SCSI sense key illegal request

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), and MSC_HandleStateWaitForCBW().

#define CSL_MSC_SCSI_SENSEKEY_MEDIA_ERROR (0x03)

SCSI sense key media error has occurred

#define CSL_MSC_SCSI_SENSEKEY_MISCOMPARE (0x0E)

SCSI sense key data miss compare

Referenced by MSC_HandleVerify10().

#define CSL_MSC_SCSI_SENSEKEY_NO_SENSE (0x00)

MSC SCSI sense keys.

SCSI no sense data

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), MSC_HandleStartStopUnit(), and MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_SENSEKEY_NOT_READY (0x02)

SCSI sense key not ready

Referenced by MSC_ExecuteRead(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleReadCapacity(), and MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_SENSEKEY_RECOVERED_ERROR (0x01)

SCSI sense key error recovered

#define CSL_MSC_SCSI_SENSEKEY_RESERVED (0x0F)

SCSI sense key reserved

#define CSL_MSC_SCSI_SENSEKEY_UNIT_ATTENTION (0x06)

SCSI sense key unit attention

Referenced by MSC_HandleStartStopUnit(), and MSC_HandleTestUnitReady().

#define CSL_MSC_SCSI_SENSEKEY_VENDOR_SPECIFIC (0x09)

SCSI sense key vendor specific data

#define CSL_MSC_SCSI_SENSEKEY_VOLUME_OVERFLOW (0x0D)

SCSI sense key volume overflow

#define CSL_MSC_SENSE_DATA0_DEFVAL (26)

Default value for element 0 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSE_DATA1_DEFVAL (0)

Default value for element 1 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSE_DATA2_DEFVAL (0x0070)

Default value for element 2 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSE_DATA3_DEFVAL (0x0000)

Default value for element 3 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSE_DATA4_DEFVAL (0x0000)

Default value for element 4 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSE_DATA5_DEFVAL ((11<<8) | 0)

Default value for element 5 in sense data array

Referenced by MSC_initMscVal().

#define CSL_MSC_SENSEDATA_LEN (15)

Sense data length in words

#define CSL_MSC_SSD_2 (3)

Sense key data word 2

Referenced by MSC_SetSenseKeys().

#define CSL_MSC_SSD_7 (8)

Sense key data word 7

Referenced by MSC_SetSenseKeys().

#define CSL_MSC_STATE_RESET_DATA_SIZE (31)

State reset data size

Referenced by MSC_HandleStateReset().

#define CSL_MSC_STORAGE_STATE_READ (5)

Storage state set to read

Referenced by MSC_Bulk(), and MSC_ExecuteRead().

#define CSL_MSC_STORAGE_STATE_RESET (0)

MSC Storage state macros.

Storage state set to reset

Referenced by MSC_Bulk(), and MSC_reqBotMscReset().

#define CSL_MSC_STORAGE_STATE_SENDING_CSW (4)

Storage state set to sending CSW

Referenced by MSC_Bulk(), MSC_ExecuteWrite(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), MSC_HandleStateSendData(), MSC_HandleStateSendStall(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), MSC_HandleVerify10(), and MSC_sendCswWithPhaseError().

#define CSL_MSC_STORAGE_STATE_SENDING_DATA (3)

Storage state set to sending data

Referenced by MSC_Bulk(), MSC_ExecuteRead(), MSC_HandleInquiry(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandleReadCapacity(), and MSC_HandleRequestSense().

#define CSL_MSC_STORAGE_STATE_SENDING_SHORT_PKT (7)

Storage state set to sending short packet

Referenced by MSC_Bulk(), MSC_HandleInquiry(), MSC_HandleRequestSense(), and MSC_HandleStateWaitForCBW().

#define CSL_MSC_STORAGE_STATE_SENDING_STALL (2)

Storage state set to sending stall signal due to some error

Referenced by MSC_Bulk(), MSC_ExecuteRead(), MSC_handleDataDirMisMatch(), MSC_HandleModeSense10(), MSC_HandleModeSense6(), MSC_HandlePreventAllowMediaRemoval(), MSC_HandleStartStopUnit(), MSC_HandleStateSendingShortPkt(), MSC_HandleStateWaitForCBW(), MSC_HandleTestUnitReady(), and MSC_HandleVerify10().

#define CSL_MSC_STORAGE_STATE_WAIT_FOR_CBW (1)

Storage state set to wait for Command Block Word

Referenced by MSC_Bulk(), MSC_HandleStateReset(), and MSC_HandleStateSendCSW().

#define CSL_MSC_STORAGE_STATE_WRITE (6)

Storage state set to write

Referenced by MSC_Bulk(), and MSC_ExecuteWrite().

#define CSL_MSC_STRDESC_LANGID_LEN (4)

String descriptor language Id length in words

#define CSL_MSC_STRING_DESCRIPTOR_TYPE (0x03)

USB MSC string descriptor type macro

Referenced by MSC_initCtrlDesc().

#define CSL_MSC_UNICODE_SIZE (66)

MSC Unicode data size

Referenced by MSC_reqGetDescriptor().

#define CSL_MSC_UNIT_REMOVEABLE (0x1)

MSC logical unit is removable

#define CSL_MSC_VERIFY_FAILED (0x1)

MSC verification failed

Referenced by MSC_ExecuteWrite().

#define CSL_MSC_VERIFY_PASSED (0x0)

USB MSC status and size definitions.

MSC verification passed

Referenced by MSC_ExecuteWrite(), MSC_HandleVerify10(), and MSC_SetLunAttr().

#define CSL_SCSI_DATA0_DEFVAL (96)

SCSI data array element 0 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA1_DEFVAL (0x0)

SCSI data array element 1 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA2_DEFVAL (0x8000)

SCSI data array element 2 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA30_DEFVAL (0x0000)

SCSI data array element 30 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA31_DEFVAL (0x2002)

SCSI data array element 31 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA32_DEFVAL (0x3802)

SCSI data array element 32 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA3_DEFVAL (0x0200)

SCSI data array element 3 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA4_DEFVAL (92)

SCSI data array element 4 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA5_DEFVAL (0x0000)

SCSI data array element 5 default value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA_NULL_VAL (0x0000)

SCSI data array element NULL value

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA_SIZE1 (6)

SCSI data index size 1 (Used for array initialization in for loop)

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA_SIZE2 (30)

SCSI data index size 2 (Used for array initialization in for loop)

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA_SIZE3 (33)

SCSI data index size 3 (Used for array initialization in for loop)

Referenced by MSC_SetLunAttr().

#define CSL_SCSI_DATA_SIZE4 (50)

SCSI data index size 4 (Used for array initialization in for loop)

Referenced by MSC_SetLunAttr().