Go to the source code of this file.
|
static int32_t | proc_builtin_scsi (uint8_t lun, uint8_t const scsi_cmd[16], uint8_t *buffer, uint32_t bufsize) |
|
static void | proc_read10_cmd (uint8_t rhport, mscd_interface_t *p_msc) |
|
static void | proc_write10_cmd (uint8_t rhport, mscd_interface_t *p_msc) |
|
static void | proc_write10_new_data (uint8_t rhport, mscd_interface_t *p_msc, uint32_t xferred_bytes) |
|
static TU_ATTR_ALWAYS_INLINE bool | is_data_in (uint8_t dir) |
|
static bool | send_csw (uint8_t rhport, mscd_interface_t *p_msc) |
|
static bool | prepare_cbw (uint8_t rhport, mscd_interface_t *p_msc) |
|
static void | fail_scsi_op (uint8_t rhport, mscd_interface_t *p_msc, uint8_t status) |
|
static uint32_t | rdwr10_get_lba (uint8_t const command[]) |
|
static uint16_t | rdwr10_get_blockcount (msc_cbw_t const *cbw) |
|
static uint16_t | rdwr10_get_blocksize (msc_cbw_t const *cbw) |
|
uint8_t | rdwr10_validate_cmd (msc_cbw_t const *cbw) |
|
bool | tud_msc_set_sense (uint8_t lun, uint8_t sense_key, uint8_t add_sense_code, uint8_t add_sense_qualifier) |
|
static void | set_sense_medium_not_present (uint8_t lun) |
|
void | mscd_init (void) |
|
bool | mscd_deinit (void) |
|
void | mscd_reset (uint8_t rhport) |
|
uint16_t | mscd_open (uint8_t rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len) |
|
static void | proc_bot_reset (mscd_interface_t *p_msc) |
|
bool | mscd_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const *request) |
|
bool | mscd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes) |
|
◆ anonymous enum
Enumerator |
---|
MSC_STAGE_CMD | |
MSC_STAGE_DATA | |
MSC_STAGE_STATUS | |
MSC_STAGE_STATUS_SENT | |
MSC_STAGE_NEED_RESET | |
Definition at line 47 of file msc_device.c.
◆ fail_scsi_op()
static void fail_scsi_op |
( |
uint8_t |
rhport, |
|
|
mscd_interface_t * |
p_msc, |
|
|
uint8_t |
status |
|
) |
| |
|
static |
◆ is_data_in()
static TU_ATTR_ALWAYS_INLINE bool is_data_in |
( |
uint8_t |
dir | ) |
|
|
inlinestatic |
◆ mscd_control_xfer_cb()
◆ mscd_deinit()
bool mscd_deinit |
( |
void |
| ) |
|
◆ mscd_init()
◆ mscd_open()
◆ mscd_reset()
void mscd_reset |
( |
uint8_t |
rhport | ) |
|
◆ mscd_xfer_cb()
bool mscd_xfer_cb |
( |
uint8_t |
rhport, |
|
|
uint8_t |
ep_addr, |
|
|
xfer_result_t |
event, |
|
|
uint32_t |
xferred_bytes |
|
) |
| |
◆ prepare_cbw()
◆ proc_bot_reset()
◆ proc_builtin_scsi()
static int32_t proc_builtin_scsi |
( |
uint8_t |
lun, |
|
|
uint8_t const |
scsi_cmd[16], |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
bufsize |
|
) |
| |
|
static |
◆ proc_read10_cmd()
◆ proc_write10_cmd()
◆ proc_write10_new_data()
static void proc_write10_new_data |
( |
uint8_t |
rhport, |
|
|
mscd_interface_t * |
p_msc, |
|
|
uint32_t |
xferred_bytes |
|
) |
| |
|
static |
◆ rdwr10_get_blockcount()
static uint16_t rdwr10_get_blockcount |
( |
msc_cbw_t const * |
cbw | ) |
|
|
inlinestatic |
◆ rdwr10_get_blocksize()
static uint16_t rdwr10_get_blocksize |
( |
msc_cbw_t const * |
cbw | ) |
|
|
inlinestatic |
◆ rdwr10_get_lba()
static uint32_t rdwr10_get_lba |
( |
uint8_t const |
command[] | ) |
|
|
inlinestatic |
◆ rdwr10_validate_cmd()
uint8_t rdwr10_validate_cmd |
( |
msc_cbw_t const * |
cbw | ) |
|
◆ send_csw()
◆ set_sense_medium_not_present()
static void set_sense_medium_not_present |
( |
uint8_t |
lun | ) |
|
|
inlinestatic |
◆ tud_msc_set_sense()
bool tud_msc_set_sense |
( |
uint8_t |
lun, |
|
|
uint8_t |
sense_key, |
|
|
uint8_t |
add_sense_code, |
|
|
uint8_t |
add_sense_qualifier |
|
) |
| |
◆ _msc_scsi_cmd_lookup
Initial value:=
{
}
@ SCSI_CMD_TEST_UNIT_READY
The SCSI Test Unit Ready command is used to determine if a device is ready to transfer data (read/wri...
@ SCSI_CMD_READ_FORMAT_CAPACITY
The command allows the Host to request a list of the possible format capacities for an installed writ...
@ SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL
@ SCSI_CMD_REQUEST_SENSE
The SCSI Request Sense command is part of the SCSI computer protocol standard. This command is used t...
@ SCSI_CMD_WRITE_10
The WRITE (10) command requests that the device server transfer the specified logical block(s) from t...
@ SCSI_CMD_MODE_SELECT_6
provides a means for the application client to specify medium, logical unit, or peripheral device par...
@ SCSI_CMD_READ_CAPACITY_10
The SCSI Read Capacity command is used to obtain data capacity information from a target device.
@ SCSI_CMD_START_STOP_UNIT
@ SCSI_CMD_READ_10
The READ (10) command requests that the device server read the specified logical block(s) and transfe...
@ SCSI_CMD_MODE_SENSE_6
provides a means for a device server to report parameters to an application client....
@ SCSI_CMD_INQUIRY
The SCSI Inquiry command is used to obtain basic information from a target device.
Definition at line 208 of file msc_device.c.
◆ _msc_scsi_cmd_table
Initial value:=
{
}
TU_ATTR_UNUSED tu_static tu_lookup_entry_t const _msc_scsi_cmd_lookup[]
Definition at line 223 of file msc_device.c.
◆ _mscd_buf
CFG_TUD_MEM_SECTION CFG_TUSB_MEM_ALIGN tu_static uint8_t _mscd_buf[CFG_TUD_MSC_EP_BUFSIZE] |
◆ _mscd_itf