sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_scsi.c
/**
  * @brief  SCSI_Verify10
  *         Process Verify10 command
  * @param  lun: Logical unit number
  * @param  params: Command parameters
  * @retval status
  */
@brief  SCSI_Verify10
Process Verify10 command
@param  lun: Logical unit number
@param  params: Command parameters
@retval status
@brief SCSI_Verify10 Process Verify10 command @param lun : Logical unit number @param params : Command parameters @retval status
static int8_t SCSI_Verify10(USBD_HandleTypeDef *pdev, uint8_t lun, uint8_t *params)
{
  USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
  if (hmsc == NULL)
  {
    return -1;
  }
  if ((params[1] & 0x02U) == 0x02U)
  {
    SCSI_SenseCode(pdev, lun, ILLEGAL_REQUEST, INVALID_FIELED_IN_COMMAND);
    return -1; 
  }
  if (SCSI_CheckAddressRange(pdev, lun, hmsc->scsi_blk_addr, hmsc->scsi_blk_len) < 0)
  {
    return -1; 
  }
  hmsc->bot_data_length = 0U;
  return 0;
}
static int8_t SCSI_Verify10 ( USBD_HandleTypeDef * pdev , uint8_t lun , uint8_t * params ) { USBD_MSC_BOT_HandleTypeDef * hmsc = ( USBD_MSC_BOT_HandleTypeDef * ) pdev -> pClassDataCmsit [ pdev -> classId ] ; if ( hmsc == NULL ) { return -1 ; } if ( ( params [ 1 ] & 0x02U ) == 0x02U ) { SCSI_SenseCode ( pdev , lun , ILLEGAL_REQUEST , INVALID_FIELED_IN_COMMAND ) ; return -1 ; } if ( SCSI_CheckAddressRange ( pdev , lun , hmsc -> scsi_blk_addr , hmsc -> scsi_blk_len ) < 0 ) { return -1 ; } hmsc -> bot_data_length = 0U ; return 0 ; }
@brief  SCSI_Verify10
         Process Verify10 command
 @param  lun: Logical unit number
 @param  params: Command parameters
 @retval status
@brief SCSI_Verify10 Process Verify10 command @param lun : Logical unit number @param params : Command parameters @retval status
/* Error, Verify Mode Not supported*/ /* error */