MSC context. More...
#include <app_usbd_msc_internal.h>
Data Fields |
|
| app_usbd_msc_state_t | state |
|
Internal module state.
|
|
| app_usbd_msc_cbw_t | cbw |
|
SCSI command block wrapper.
|
|
| app_usbd_msc_csw_t | csw |
|
SCSI Command status wrapper.
|
|
| struct { | |
| struct { | |
| uint8_t rd_idx | |
|
Buffer read index.
|
|
| uint8_t d_count | |
|
Number of blocks inside the buffer ready to process.
|
|
| uint8_t a_count | |
|
Number of blocks allocated in the buffer.
|
|
| } buff | |
| struct { | |
| size_t size_left | |
|
Number of bytes left to transfer.
|
|
| size_t datalen_left | |
|
Number of bytes left that was requested by the host.
|
|
| bool pending | |
|
The flag marking the pending transfer.
|
|
| bool abort | |
| } transfer | |
| struct { | |
| uint8_t lun | |
|
The logical unit for current transfer block.
|
|
| size_t blk_size | |
|
The size of the block of the selected lun.
|
|
| size_t size_left | |
|
Number of bytes left to be processed by block device.
|
|
| size_t datalen_left | |
|
Number of bytes left that was requested by the host.
|
|
| uint32_t blk_idx | |
|
Current block index.
|
|
| bool pending | |
|
The flag marking the pending transfer.
|
|
| bool abort | |
| } process | |
| } | current |
| union { | |
| app_usbd_scsi_cmd_inquiry_resp_t inquiry | |
|
APP_USBD_SCSI_CMD_INQUIRY
response
|
|
| app_usbd_scsi_cmd_requestsense_resp_t requestsense | |
|
APP_USBD_SCSI_CMD_REQUESTSENSE
response
|
|
| app_usbd_scsi_cmd_readcapacity10_resp_t readcapacity10 | |
|
APP_USBD_SCSI_CMD_READCAPACITY10
response
|
|
| app_usbd_scsi_cmd_modesense6_resp_t modesense6 | |
|
APP_USBD_SCSI_CMD_MODESENSE6
response
|
|
| app_usbd_scsi_cmd_modesense10_resp_t modesense10 | |
|
APP_USBD_SCSI_CMD_MODESENSE10
response
|
|
| } | scsi_resp |
| uint16_t | blk_dev_init_mask |
|
Block devices init mask.
|
|
Detailed Description
MSC context.
Field Documentation
| bool app_usbd_msc_ctx_t::abort |
Something fails during reading - abort transfer and mark an error,
Used for read access.
Something fails during transfer - abort processing and mark an error,
Used for write access.
| size_t app_usbd_msc_ctx_t::size_left |
Number of bytes left to transfer.
Number of bytes left to be processed by block device.
- components/libraries/usbd/class/msc/app_usbd_msc_internal.h