2.8.4.3 USB_DEVICE_MSD_MEDIA_INIT_DATA Structure
C
typedef struct { SYS_MODULE_INDEX instanceIndex; uint32_t sectorSize; uint8_t * sectorBuffer; uint8_t * blockBuffer; void * block0StartAddress; SCSI_INQUIRY_RESPONSE inquiryResponse; USB_DEVICE_MSD_MEDIA_FUNCTIONS mediaFunctions; } USB_DEVICE_MSD_MEDIA_INIT_DATA;
Summary
USB Device MSD Media Initialization Data Member
It holds pointer to inquiry response, instance index and pointer to a structure that contains all media callback functions.
Members
Members | Description |
SYS_MODULE_INDEX instanceIndex; | Instance index of the media driver to opened for this LUN. |
uint32_t sectorSize; | Sector size for this LUN. If 0, means that sector size will be available from media geometry. |
uint8_t * sectorBuffer; | Pointer to a bye buffer whose size if the size of the sector on this media. In case of a PIC32MZ device, this buffer should be coherent and should be aligned on a 16 byte boundary. |
uint8_t * blockBuffer; | In a case where the sector size of this media is less than the size of the write block, a byte buffer of write block size should be provided to the function driver. For example, the PIC32MZ NVM flash driver has a flash program memory row size of 4096 bytes which is more than the standard 512 byte sector. In such a case the application should set this pointer to 4096 byte buffer. |
void * block0StartAddress; | Block 0 Start Address on this media. If non zero, then this address will be passed to blockStartAddressSet function. This should be set to start of the storage address on the media. |
SCSI_INQUIRY_RESPONSE inquiryResponse; | Pointer to SCSI inquiry response for this LUN. |
USB_DEVICE_MSD_MEDIA_FUNCTIONS mediaFunctions; | Function pointers to the media driver functions. |
Remarks
An object of this structure must be configured by the user at compile time.