Prusa MINI Firmware overview
|
Go to the documentation of this file.
29 #ifndef __USBH_MSC_SCSI_H
30 #define __USBH_MSC_SCSI_H
88 #define OPCODE_TEST_UNIT_READY 0x00
89 #define OPCODE_READ_CAPACITY10 0x25
90 #define OPCODE_READ10 0x28
91 #define OPCODE_WRITE10 0x2A
92 #define OPCODE_REQUEST_SENSE 0x03
93 #define OPCODE_INQUIRY 0x12
95 #define DATA_LEN_MODE_TEST_UNIT_READY 0
96 #define DATA_LEN_READ_CAPACITY10 8
97 #define DATA_LEN_INQUIRY 36
98 #define DATA_LEN_REQUEST_SENSE 14
100 #define CBW_CB_LENGTH 16
101 #define CBW_LENGTH 10
106 #define SCSI_SENSE_KEY_NO_SENSE 0x00
107 #define SCSI_SENSE_KEY_RECOVERED_ERROR 0x01
108 #define SCSI_SENSE_KEY_NOT_READY 0x02
109 #define SCSI_SENSE_KEY_MEDIUM_ERROR 0x03
110 #define SCSI_SENSE_KEY_HARDWARE_ERROR 0x04
111 #define SCSI_SENSE_KEY_ILLEGAL_REQUEST 0x05
112 #define SCSI_SENSE_KEY_UNIT_ATTENTION 0x06
113 #define SCSI_SENSE_KEY_DATA_PROTECT 0x07
114 #define SCSI_SENSE_KEY_BLANK_CHECK 0x08
115 #define SCSI_SENSE_KEY_VENDOR_SPECIFIC 0x09
116 #define SCSI_SENSE_KEY_COPY_ABORTED 0x0A
117 #define SCSI_SENSE_KEY_ABORTED_COMMAND 0x0B
118 #define SCSI_SENSE_KEY_VOLUME_OVERFLOW 0x0D
119 #define SCSI_SENSE_KEY_MISCOMPARE 0x0E
128 #define SCSI_ASC_NO_ADDITIONAL_SENSE_INFORMATION 0x00
129 #define SCSI_ASC_LOGICAL_UNIT_NOT_READY 0x04
130 #define SCSI_ASC_INVALID_FIELD_IN_CDB 0x24
131 #define SCSI_ASC_WRITE_PROTECTED 0x27
132 #define SCSI_ASC_FORMAT_ERROR 0x31
133 #define SCSI_ASC_INVALID_COMMAND_OPERATION_CODE 0x20
134 #define SCSI_ASC_NOT_READY_TO_READY_CHANGE 0x28
135 #define SCSI_ASC_MEDIUM_NOT_PRESENT 0x3A
144 #define SCSI_ASCQ_FORMAT_COMMAND_FAILED 0x01
145 #define SCSI_ASCQ_INITIALIZING_COMMAND_REQUIRED 0x02
146 #define SCSI_ASCQ_OPERATION_IN_PROGRESS 0x07
USBH_StatusTypeDef USBH_MSC_SCSI_Read(USBH_HandleTypeDef *phost, uint8_t lun, uint32_t address, uint8_t *pbuf, uint32_t length)
USBH_MSC_SCSI_Read Issue Read10 command.
Definition: usbh_msc_scsi.c:384
Header file for usbh_core.c.
USBH_StatusTypeDef USBH_MSC_SCSI_ReadCapacity(USBH_HandleTypeDef *phost, uint8_t lun, SCSI_CapacityTypeDef *capacity)
USBH_MSC_SCSI_ReadCapacity Issue Read Capacity command.
Definition: usbh_msc_scsi.c:146
Definition: usbh_msc_scsi.h:59
uint8_t key
Definition: usbh_msc_scsi.h:69
USBH_StatusTypeDef USBH_MSC_SCSI_TestUnitReady(USBH_HandleTypeDef *phost, uint8_t lun)
USBH_MSC_SCSI_TestUnitReady Issue TestUnitReady command.
Definition: usbh_msc_scsi.c:104
Definition: usbh_def.h:450
uint8_t asc
Definition: usbh_msc_scsi.h:70
Definition: usbh_msc_scsi.h:67
uint8_t ascq
Definition: usbh_msc_scsi.h:71
USBH_StatusTypeDef USBH_MSC_SCSI_Inquiry(USBH_HandleTypeDef *phost, uint8_t lun, SCSI_StdInquiryDataTypeDef *inquiry)
USBH_MSC_SCSI_Inquiry Issue Inquiry command.
Definition: usbh_msc_scsi.c:202
uint32_t block_nbr
Definition: usbh_msc_scsi.h:61
uint8_t PeripheralQualifier
Definition: usbh_msc_scsi.h:77
Definition: usbh_msc_scsi.h:75
const uint8_t[]
Definition: 404_html.c:3
UsbDeviceAddress address
Definition: address.h:202
USBH_StatusTypeDef
Definition: usbh_def.h:302
USBH_StatusTypeDef USBH_MSC_SCSI_RequestSense(USBH_HandleTypeDef *phost, uint8_t lun, SCSI_SenseTypeDef *sense_data)
USBH_MSC_SCSI_RequestSense Issue RequestSense command.
Definition: usbh_msc_scsi.c:264
USBH_StatusTypeDef USBH_MSC_SCSI_Write(USBH_HandleTypeDef *phost, uint8_t lun, uint32_t address, uint8_t *pbuf, uint32_t length)
USBH_MSC_SCSI_Write Issue write10 command.
Definition: usbh_msc_scsi.c:323
uint8_t RemovableMedia
Definition: usbh_msc_scsi.h:79
uint8_t DeviceType
Definition: usbh_msc_scsi.h:78
png_uint_32 length
Definition: png.c:2247
uint16_t block_size
Definition: usbh_msc_scsi.h:62