/* USBD_MTP_STORAGE_Cancel Reinitialize all states and cancel transfer through Bulk transfer.  */
void USBD_MTP_STORAGE_Cancel(USBD_HandleTypeDef *pdev, MTP_ResponsePhaseTypeDef MTP_ResponsePhase)
/* USBD_MTP_STORAGE_Cancel Reinitialize all states and cancel transfer through Bulk transfer.  */
void USBD_MTP_STORAGE_Cancel(USBD_HandleTypeDef *pdev, MTP_ResponsePhaseTypeDef MTP_ResponsePhase)
{
  USBD_MTP_HandleTypeDef  *hmtp = (USBD_MTP_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
  hmtp->MTP_ResponsePhase = MTP_PHASE_IDLE;
  ReadDataStatus = READ_FIRST_DATA;
  hmtp->RECEIVE_DATA_STATUS = RECEIVE_IDLE_STATE;
  if (MTP_ResponsePhase == MTP_RECEIVE_DATA)
  {
    ((USBD_MTP_ItfTypeDef *)pdev->pUserData[pdev->classId])->Cancel(1U);
  }
  else
  {
    ((USBD_MTP_ItfTypeDef *)pdev->pUserData[pdev->classId])->Cancel(0U);
  }
}