USB Component  Version 6.13.6
MDK Middleware for USB Device and Host Communication
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
USBD_MSC: Mass Storage Class Functions

Events generated by USB Device - Mass Storage Class functions. More...

Functions

__STATIC_INLINE void EvrUSBD_MSC_Initialize (uint8_t instance)
 Event on internal library operation MSC initialize start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_InitializeFailed (uint8_t instance, usbStatus error)
 Event on internal library operation MSC initialize failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Uninitialize (uint8_t instance)
 Event on internal library operation MSC uninitialize start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_UninitializeFailed (uint8_t instance, usbStatus error)
 Event on internal library operation MSC uninitialize failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Reset (uint8_t instance)
 Event on internal library operation MSC reset start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_ResetFailed (uint8_t instance, usbStatus error)
 Event on internal library operation MSC reset failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_BOMSReset (uint8_t instance)
 Event on internal library operation Bulk Only Mass Storage Reset finished successfully (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_BOMSResetFailed (uint8_t instance)
 Event on internal library operation Bulk Only Mass Storage Reset failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_GetMaxLUN (uint8_t instance, uint8_t lun)
 Event on internal library operation Get Max LUN finished successfully (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_GetMaxLUNFailed (uint8_t instance)
 Event on internal library operation Get Max LUN failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_TestUnitReady (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Test Unit Ready finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_RequestSense (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Request Sense finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Inquiry (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Inquiry finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_StartStopUnit (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Start/Stop Unit finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_MediaRemoval (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Media Removal finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_ModeSense (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Mode Sense 6/10 finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_ReadFormatCapacities (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Read Format Capacities finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_ReadCapacity (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Read Capacity finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Read (uint8_t instance, uint8_t lun, uint32_t lba, uint32_t cnt)
 Event on internal library operation SCSI Read 10/12 start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_ReadDone (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Read 10/12 finished (Detail) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Write (uint8_t instance, uint8_t lun, uint32_t lba, uint32_t cnt)
 Event on internal library operation SCSI Write 10/12 start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_WriteDone (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Write 10/12 finished (Detail) More...
 
__STATIC_INLINE void EvrUSBD_MSC_Verify (uint8_t instance, uint8_t lun, uint32_t lba, uint32_t cnt)
 Event on internal library operation SCSI Verify 10 start (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_VerifyDone (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Verify 10 finished (Detail) More...
 
__STATIC_INLINE void EvrUSBD_MSC_SyncCache (uint8_t instance, uint8_t lun, uint32_t status)
 Event on internal library operation SCSI Synchronize Cache 10/16 finished (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_UnsupportedCommand (uint8_t instance, uint8_t op_code)
 Event on internal library operation SCSI unsupported command processing (Operation) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnInitialize (uint8_t n)
 Event on USBD_MSCn_Initialize user callback function start (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnUninitialize (uint8_t n)
 Event on USBD_MSCn_Uninitialize user callback function start (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnGetCacheInfo (uint8_t n, uint32_t size)
 Event on USBD_MSCn_GetCacheInfo user callback function finished (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnGetCacheInfoFailed (uint8_t n)
 Event on USBD_MSCn_GetCacheInfo user callback function failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnGetMediaCapacity (uint8_t n, uint8_t lun, uint32_t block_count, uint32_t block_size)
 Event on USBD_MSCn_GetMediaCapacity user callback function finished (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnGetMediaCapacityFailed (uint8_t n, uint8_t lun)
 Event on USBD_MSCn_GetMediaCapacity user callback function failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnRead (uint8_t n, uint8_t lun, uint32_t lba, uint32_t cnt, const uint8_t *buf)
 Event on USBD_MSCn_Read user callback function finished (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnReadFailed (uint8_t n, uint8_t lun, uint32_t lba)
 Event on USBD_MSCn_Read user callback function failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnWrite (uint8_t n, uint8_t lun, uint32_t lba, uint32_t cnt, const uint8_t *buf)
 Event on USBD_MSCn_Write user callback function finished (API) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnWriteFailed (uint8_t n, uint8_t lun, uint32_t lba)
 Event on USBD_MSCn_Write user callback function failed (Error) More...
 
__STATIC_INLINE void EvrUSBD_MSC_OnCheckMedia (uint8_t n, uint8_t lun, bool wp, bool mp)
 Event on USBD_MSCn_CheckMedia user callback function finished (API) More...
 

Description

Events generated by USB Device - Mass Storage Class functions.

Function Documentation

__STATIC_INLINE void EvrUSBD_MSC_BOMSReset ( uint8_t  instance)

Event on internal library operation Bulk Only Mass Storage Reset finished successfully (Operation)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_BOMSResetFailed ( uint8_t  instance)

Event on internal library operation Bulk Only Mass Storage Reset failed (Error)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_GetMaxLUN ( uint8_t  instance,
uint8_t  lun 
)

Event on internal library operation Get Max LUN finished successfully (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
__STATIC_INLINE void EvrUSBD_MSC_GetMaxLUNFailed ( uint8_t  instance)

Event on internal library operation Get Max LUN failed (Error)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_Initialize ( uint8_t  instance)

Event on internal library operation MSC initialize start (Operation)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_InitializeFailed ( uint8_t  instance,
usbStatus  error 
)

Event on internal library operation MSC initialize failed (Error)

Parameters
instanceinstance of MSC class
errorerror code usbStatus
__STATIC_INLINE void EvrUSBD_MSC_Inquiry ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Inquiry finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_MediaRemoval ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Media Removal finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_ModeSense ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Mode Sense 6/10 finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_OnCheckMedia ( uint8_t  n,
uint8_t  lun,
bool  wp,
bool  mp 
)

Event on USBD_MSCn_CheckMedia user callback function finished (API)

Parameters
ninstance of MSC class
lunlogical unit number
wpmedia write protect status
mpmedia present status
__STATIC_INLINE void EvrUSBD_MSC_OnGetCacheInfo ( uint8_t  n,
uint32_t  size 
)

Event on USBD_MSCn_GetCacheInfo user callback function finished (API)

Parameters
ninstance of MSC class
sizecache buffer size
__STATIC_INLINE void EvrUSBD_MSC_OnGetCacheInfoFailed ( uint8_t  n)

Event on USBD_MSCn_GetCacheInfo user callback function failed (Error)

Parameters
ninstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_OnGetMediaCapacity ( uint8_t  n,
uint8_t  lun,
uint32_t  block_count,
uint32_t  block_size 
)

Event on USBD_MSCn_GetMediaCapacity user callback function finished (API)

Parameters
ninstance of MSC class
lunlogical unit number
block_counttotal number of blocks on media
block_sizemedia block size
__STATIC_INLINE void EvrUSBD_MSC_OnGetMediaCapacityFailed ( uint8_t  n,
uint8_t  lun 
)

Event on USBD_MSCn_GetMediaCapacity user callback function failed (Error)

Parameters
ninstance of MSC class
lunlogical unit number
__STATIC_INLINE void EvrUSBD_MSC_OnInitialize ( uint8_t  n)

Event on USBD_MSCn_Initialize user callback function start (API)

Parameters
ninstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_OnRead ( uint8_t  n,
uint8_t  lun,
uint32_t  lba,
uint32_t  cnt,
const uint8_t *  buf 
)

Event on USBD_MSCn_Read user callback function finished (API)

Parameters
ninstance of MSC class
lunlogical unit number
lbalogical address of first block to read
cntnumber of contiguous blocks to read from media
bufdata buffer for data read from media
__STATIC_INLINE void EvrUSBD_MSC_OnReadFailed ( uint8_t  n,
uint8_t  lun,
uint32_t  lba 
)

Event on USBD_MSCn_Read user callback function failed (Error)

Parameters
ninstance of MSC class
lunlogical unit number
lbalogical address of first block to read
__STATIC_INLINE void EvrUSBD_MSC_OnUninitialize ( uint8_t  n)

Event on USBD_MSCn_Uninitialize user callback function start (API)

Parameters
ninstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_OnWrite ( uint8_t  n,
uint8_t  lun,
uint32_t  lba,
uint32_t  cnt,
const uint8_t *  buf 
)

Event on USBD_MSCn_Write user callback function finished (API)

Parameters
ninstance of MSC class
lunlogical unit number
lbalogical address of first block to write
cntnumber of contiguous blocks to write to media
bufdata buffer containing data to write to media
__STATIC_INLINE void EvrUSBD_MSC_OnWriteFailed ( uint8_t  n,
uint8_t  lun,
uint32_t  lba 
)

Event on USBD_MSCn_Write user callback function failed (Error)

Parameters
ninstance of MSC class
lunlogical unit number
lbalogical address of first block to write
__STATIC_INLINE void EvrUSBD_MSC_Read ( uint8_t  instance,
uint8_t  lun,
uint32_t  lba,
uint32_t  cnt 
)

Event on internal library operation SCSI Read 10/12 start (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
lbalogical address of first block to read
cntnumber of contiguous blocks to read from media
__STATIC_INLINE void EvrUSBD_MSC_ReadCapacity ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Read Capacity finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_ReadDone ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Read 10/12 finished (Detail)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_ReadFormatCapacities ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Read Format Capacities finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_RequestSense ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Request Sense finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_Reset ( uint8_t  instance)

Event on internal library operation MSC reset start (Operation)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_ResetFailed ( uint8_t  instance,
usbStatus  error 
)

Event on internal library operation MSC reset failed (Error)

Parameters
instanceinstance of MSC class
errorerror code usbStatus
__STATIC_INLINE void EvrUSBD_MSC_StartStopUnit ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Start/Stop Unit finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_SyncCache ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Synchronize Cache 10/16 finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_TestUnitReady ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Test Unit Ready finished (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_Uninitialize ( uint8_t  instance)

Event on internal library operation MSC uninitialize start (Operation)

Parameters
instanceinstance of MSC class
__STATIC_INLINE void EvrUSBD_MSC_UninitializeFailed ( uint8_t  instance,
usbStatus  error 
)

Event on internal library operation MSC uninitialize failed (Error)

Parameters
instanceinstance of MSC class
errorerror code usbStatus
__STATIC_INLINE void EvrUSBD_MSC_UnsupportedCommand ( uint8_t  instance,
uint8_t  op_code 
)

Event on internal library operation SCSI unsupported command processing (Operation)

Parameters
instanceinstance of MSC class
op_codeSCSI operation code
__STATIC_INLINE void EvrUSBD_MSC_Verify ( uint8_t  instance,
uint8_t  lun,
uint32_t  lba,
uint32_t  cnt 
)

Event on internal library operation SCSI Verify 10 start (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
lbalogical address of first block to verify
cntnumber of contiguous blocks to verify
__STATIC_INLINE void EvrUSBD_MSC_VerifyDone ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Verify 10 finished (Detail)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed
__STATIC_INLINE void EvrUSBD_MSC_Write ( uint8_t  instance,
uint8_t  lun,
uint32_t  lba,
uint32_t  cnt 
)

Event on internal library operation SCSI Write 10/12 start (Operation)

Parameters
instanceinstance of MSC class
lunlogical unit number
lbalogical address of first block to write
cntnumber of contiguous blocks to write to media
__STATIC_INLINE void EvrUSBD_MSC_WriteDone ( uint8_t  instance,
uint8_t  lun,
uint32_t  status 
)

Event on internal library operation SCSI Write 10/12 finished (Detail)

Parameters
instanceinstance of MSC class
lunlogical unit number
statusrequest execution status
  • value 0: No error
  • value 1: Error - Not Ready - medium not present
  • value 2: Error - Medium Error - write fault
  • value 3: Error - Medium Error - unrecoverable read error
  • value 4: Error - Illegal Request - invalid/unsupported command code
  • value 5: Error - Illegal Request - invalid field in CDB (Command Descriptor Block)
  • value 6: Error - Illegal Request - invalid parameter value
  • value 7: Error - Write Protect - command not allowed