23 #ifndef __USBH_MSC_SCSI_H__
24 #define __USBH_MSC_SCSI_H__
54 USBH_MSC_PHASE_ERROR = 2,
56 }USBH_MSC_Status_TypeDef;
59 CMD_UNINITIALIZED_STATE =0,
70 uint16_t MSPageLength;
73 uint8_t MSWriteProtect;
87 #define OPCODE_TEST_UNIT_READY 0X00
88 #define OPCODE_READ_CAPACITY10 0x25
89 #define OPCODE_MODE_SENSE6 0x1A
90 #define OPCODE_READ10 0x28
91 #define OPCODE_WRITE10 0x2A
92 #define OPCODE_REQUEST_SENSE 0x03
94 #define DESC_REQUEST_SENSE 0X00
95 #define ALLOCATION_LENGTH_REQUEST_SENSE 63
96 #define XFER_LEN_READ_CAPACITY10 8
97 #define XFER_LEN_MODE_SENSE6 63
99 #define MASK_MODE_SENSE_WRITE_PROTECT 0x80
100 #define MODE_SENSE_PAGE_CONTROL_FIELD 0x00
101 #define MODE_SENSE_PAGE_CODE 0x3F
102 #define DISK_WRITE_PROTECTED 0x01
143 #endif //__USBH_MSC_SCSI_H__
Header file for usbh_stdreq.c.
uint8_t USBH_MSC_ReadCapacity10(USB_OTG_CORE_HANDLE *pdev)
USBH_MSC_ReadCapacity10 Issue the read capacity command to the device. Once the response received...
Definition: usbh_msc_scsi.c:197
Definition: usbh_msc_scsi.h:66
Definition: usb_core.h:287
uint8_t USBH_MSC_ModeSense6(USB_OTG_CORE_HANDLE *pdev)
USBH_MSC_ModeSense6 Issue the Mode Sense6 Command to the device. This function is used for reading th...
Definition: usbh_msc_scsi.c:283
uint8_t USBH_MSC_Write10(USB_OTG_CORE_HANDLE *pdev, uint8_t *, uint32_t, uint32_t)
USBH_MSC_Write10 Issue the write command to the device. Once the response received, it updates the status to upper layer.
Definition: usbh_msc_scsi.c:471
uint8_t USBH_MSC_RequestSense(USB_OTG_CORE_HANDLE *pdev)
USBH_MSC_RequestSense Issues the Request Sense command to the device. Once the response received...
Definition: usbh_msc_scsi.c:375
uint8_t USBH_MSC_Read10(USB_OTG_CORE_HANDLE *pdev, uint8_t *, uint32_t, uint32_t)
USBH_MSC_Read10 Issue the read command to the device. Once the response received, it updates the stat...
Definition: usbh_msc_scsi.c:559
uint8_t USBH_MSC_TestUnitReady(USB_OTG_CORE_HANDLE *pdev)
USBH_MSC_TestUnitReady Issues 'Test unit ready' command to the device. Once the response received...
Definition: usbh_msc_scsi.c:125