tinyusb
|
Functions | |
void | tusbd_msc_mounted_cb (uint8_t coreid) |
void | tusbd_msc_unmounted_cb (uint8_t coreid) |
uint16_t | tusbd_msc_read10_cb (uint8_t coreid, uint8_t lun, void **pp_buffer, uint32_t lba, uint16_t block_count) |
Callback that is invoked when tinyusb stack received SCSI_CMD_READ_10 command from host. More... | |
uint16_t | tusbd_msc_write10_cb (uint8_t coreid, uint8_t lun, void **pp_buffer, uint32_t lba, uint16_t block_count) |
Callback that is invoked when tinyusb stack received SCSI_CMD_WRITE_10 command from host. More... | |
msc_csw_status_t | tusbd_msc_scsi_cb (uint8_t coreid, uint8_t lun, uint8_t scsi_cmd[16], void const **pp_buffer, uint16_t *p_length) |
Callback that is invoked when tinyusb stack received an SCSI command other than SCSI_CMD_WRITE_10 and SCSI_CMD_READ_10 command from host. More... | |
uint16_t tusbd_msc_read10_cb | ( | uint8_t | coreid, |
uint8_t | lun, | ||
void ** | pp_buffer, | ||
uint32_t | lba, | ||
uint16_t | block_count | ||
) |
Callback that is invoked when tinyusb stack received SCSI_CMD_READ_10 command from host.
[in] | coreid | USB Controller ID |
[in] | lun | Targeted Logical Unit |
[out] | pp_buffer | Pointer to buffer which application need to update with the response data's address. Must be accessible by USB controller (see TUSB_CFG_ATTR_USBRAM) |
[in] | lba | Starting Logical Block Address to be read |
[in] | block_count | Number of requested block |
non-zero | Actual number of block that application processed, must be less than or equal to block_count. |
zero | Indicate error in retrieving data from application. Tinyusb device stack will STALL the corresponding endpoint and return failed status in command status wrapper phase. |
msc_csw_status_t tusbd_msc_scsi_cb | ( | uint8_t | coreid, |
uint8_t | lun, | ||
uint8_t | scsi_cmd[16], | ||
void const ** | pp_buffer, | ||
uint16_t * | p_length | ||
) |
Callback that is invoked when tinyusb stack received an SCSI command other than SCSI_CMD_WRITE_10 and SCSI_CMD_READ_10 command from host.
[in] | coreid | USB Controller ID |
[in] | lun | Targeted Logical Unit |
[in] | scsi_cmd | SCSI command contents, application should examine this command block to know which command host requested |
[out] | pp_buffer | Pointer to buffer which application need to update with the address to transfer data with host. The buffer address can be anywhere since the stack will copy its contents to a internal USB-accessible buffer. |
[in] | p_length | length |
non-zero | Actual number of block that application can receive and must be less than or equal to block_count. |
zero | Indicate error in retrieving data from application. Tinyusb device stack will STALL the corresponding endpoint and return failed status in command status wrapper phase. |
uint16_t tusbd_msc_write10_cb | ( | uint8_t | coreid, |
uint8_t | lun, | ||
void ** | pp_buffer, | ||
uint32_t | lba, | ||
uint16_t | block_count | ||
) |
Callback that is invoked when tinyusb stack received SCSI_CMD_WRITE_10 command from host.
[in] | coreid | USB Controller ID |
[in] | lun | Targeted Logical Unit |
[out] | pp_buffer | Pointer to buffer which application need to update with the address to hold data from host Must be accessible by USB controller (see TUSB_CFG_ATTR_USBRAM) |
[in] | lba | Starting Logical Block Address to be write |
[in] | block_count | Number of requested block |
non-zero | Actual number of block that application can receive and must be less than or equal to block_count. |
zero | Indicate error in retrieving data from application. Tinyusb device stack will STALL the corresponding endpoint and return failed status in command status wrapper phase. |