Searched refs:cbw (Results 1 – 3 of 3) sorted by relevance
/hal_espressif-3.6.0/components/usb/test/common/ |
D | test_usb_mock_classes.c | 60 void mock_msc_scsi_init_cbw(mock_msc_bulk_cbw_t *cbw, bool is_read, int offset, int num_sectors, ui… in mock_msc_scsi_init_cbw() argument 62 cbw->dCBWSignature = 0x43425355; //Fixed value in mock_msc_scsi_init_cbw() 63 cbw->dCBWTag = tag; //Random value that is echoed back in mock_msc_scsi_init_cbw() 64 cbw->dCBWDataTransferLength = num_sectors * MOCK_MSC_SCSI_SECTOR_SIZE; in mock_msc_scsi_init_cbw() 65 cbw->bmCBWFlags = (is_read) ? (1 << 7) : 0; //If this is a read, set the direction flag in mock_msc_scsi_init_cbw() 66 cbw->bCBWLUN = MOCK_MSC_SCSI_LUN; in mock_msc_scsi_init_cbw() 67 cbw->bCBWCBLength = 10; //The length of the SCSI command in mock_msc_scsi_init_cbw() 69 cbw->CBWCB.opcode = (is_read) ? 0x28 : 0x2A; //SCSI CMD READ10 or WRITE10 in mock_msc_scsi_init_cbw() 70 cbw->CBWCB.flags = 0; in mock_msc_scsi_init_cbw() 71 cbw->CBWCB.lba_3 = (offset >> 24); in mock_msc_scsi_init_cbw() [all …]
|
D | test_usb_mock_classes.h | 160 void mock_msc_scsi_init_cbw(mock_msc_bulk_cbw_t *cbw, bool is_read, int offset, int num_sectors, ui…
|
/hal_espressif-3.6.0/examples/peripherals/usb/host/msc/components/msc/src/ |
D | msc_scsi_bot.c | 284 static esp_err_t bot_execute_command(msc_device_t *device, msc_cbw_t *cbw, void *data, size_t size) in bot_execute_command() argument 287 msc_endpoint_t ep = (cbw->flags & CWB_FLAG_DIRECTION_IN) ? MSC_EP_IN : MSC_EP_OUT; in bot_execute_command() 289 MSC_RETURN_ON_ERROR( msc_bulk_transfer(device, (uint8_t *)cbw, CBW_SIZE, MSC_EP_OUT) ); in bot_execute_command() 310 return check_csw(&csw, cbw->tag); in bot_execute_command() 320 cbw_read10_t cbw = { in scsi_cmd_read10() local 328 return bot_execute_command(device, &cbw.base, data, num_sectors * sector_size); in scsi_cmd_read10() 337 cbw_write10_t cbw = { in scsi_cmd_write10() local 344 return bot_execute_command(device, &cbw.base, (void *)data, num_sectors * sector_size); in scsi_cmd_write10() 351 cbw_read_capacity_t cbw = { in scsi_cmd_read_capacity() local 356 MSC_RETURN_ON_ERROR( bot_execute_command(device, &cbw.base, &response, sizeof(response)) ); in scsi_cmd_read_capacity() [all …]
|