34 #define UNUSED(x) (void)(x) 108 uint32_t blk_offset ,
225 if (params[1] & 0x01)
236 if (params[4] <= len)
299 for(i=0 ; i < 12 ; i++)
408 if (params[4] <= REQUEST_SENSE_DATA_LEN)
481 (params[3] << 16) | \
556 (params[3] << 16) | \
604 if ((params[1]& 0x02) == 0x02)
611 (params[3] << 16) | \
static int8_t SCSI_ProcessRead(uint8_t lun)
SCSI_ProcessRead Handle Read Process.
#define SCSI_START_STOP_UNIT
#define SCSI_REQUEST_SENSE
#define INVALID_FIELED_IN_COMMAND
struct _SENSE_ITEM::@58::_ASCs b
uint32_t DCD_EP_Tx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
Transmit data over USB.
SCSI_Sense_TypeDef SCSI_Sense[SENSE_LIST_DEEPTH]
#define UNRECOVERED_READ_ERROR
int8_t(* GetCapacity)(uint8_t lun, uint32_t *block_num, uint32_t *block_size)
const uint8_t MSC_Page00_Inquiry_Data[]
#define SCSI_TEST_UNIT_READY
#define MEDIUM_NOT_PRESENT
static int8_t SCSI_StartStopUnit(uint8_t lun, uint8_t *params)
SCSI_StartStopUnit Process Start Stop Unit command.
#define REQUEST_SENSE_DATA_LEN
header for the STORAGE DISK file file
static int8_t SCSI_Inquiry(uint8_t lun, uint8_t *params)
SCSI_Inquiry Process Inquiry command.
int8_t(* IsReady)(uint8_t lun)
#define LENGTH_INQUIRY_PAGE00
static int8_t SCSI_ProcessWrite(uint8_t lun)
SCSI_ProcessWrite Handle Write Process.
void MSC_BOT_SendCSW(USB_OTG_CORE_HANDLE *pdev, uint8_t CSW_Status)
MSC_BOT_SendCSW Send the Command Status Wrapper.
#define SCSI_MODE_SENSE10
#define USBD_STD_INQUIRY_LENGTH
int8_t SCSI_ProcessCmd(USB_OTG_CORE_HANDLE *pdev, uint8_t lun, uint8_t *params)
SCSI_ProcessCmd Process SCSI commands.
header for the usbd_msc_data.c file
const uint8_t MSC_Mode_Sense6_data[]
static int8_t SCSI_TestUnitReady(uint8_t lun, uint8_t *params)
SCSI_TestUnitReady Process SCSI Test Unit Ready Command.
#define SCSI_READ_FORMAT_CAPACITIES
#define ADDRESS_OUT_OF_RANGE
header for the usbd_msc_scsi.c file
int8_t(* Write)(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
static int8_t SCSI_RequestSense(uint8_t lun, uint8_t *params)
SCSI_RequestSense Process Request Sense command.
#define SENSE_LIST_DEEPTH
static int8_t SCSI_Write10(uint8_t lun, uint8_t *params)
SCSI_Write10 Process Write10 command.
static int8_t SCSI_Read10(uint8_t lun, uint8_t *params)
SCSI_Read10 Process Read10 command.
#define SCSI_READ_CAPACITY10
USBD_STORAGE_cb_TypeDef * USBD_STORAGE_fops
MSC_BOT_CBW_TypeDef MSC_BOT_cbw
static int8_t SCSI_ReadFormatCapacity(uint8_t lun, uint8_t *params)
SCSI_ReadFormatCapacity Process Read Format Capacity command.
int8_t(* IsWriteProtected)(uint8_t lun)
USB_OTG_CORE_HANDLE * cdev
void SCSI_SenseCode(uint8_t lun, uint8_t sKey, uint8_t ASC)
SCSI_SenseCode Load the last error code in the error list.
static int8_t SCSI_CheckAddressRange(uint8_t lun, uint32_t blk_offset, uint16_t blk_nbr)
SCSI_CheckAddressRange Check address range.
MSC_BOT_CSW_TypeDef MSC_BOT_csw
static int8_t SCSI_ModeSense6(uint8_t lun, uint8_t *params)
SCSI_ModeSense6 Process Mode Sense6 command.
#define SCSI_ALLOW_MEDIUM_REMOVAL
header for the usbd_msc_bot.c file
int8_t(* Read)(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len)
static int8_t SCSI_ReadCapacity10(uint8_t lun, uint8_t *params)
SCSI_ReadCapacity10 Process Read Capacity 10 command.
const uint8_t MSC_Mode_Sense10_data[]
static int8_t SCSI_Verify10(uint8_t lun, uint8_t *params)
SCSI_Verify10 Process Verify10 command.
static int8_t SCSI_ModeSense10(uint8_t lun, uint8_t *params)
SCSI_ModeSense10 Process Mode Sense10 command.