/* USBH_MSC_BOT_Abort This function manages the different Error handling for STALL.  */
USBH_Status USBH_MSC_BOT_Abort(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint8_t direction)
/* USBH_MSC_BOT_Abort This function manages the different Error handling for STALL.  */
USBH_Status USBH_MSC_BOT_Abort(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint8_t direction)
{
  USBH_Status status;
  status = USBH_BUSY;
  switch (direction)
  {
  case USBH_MSC_DIR_IN :
    status = USBH_ClrFeature(pdev,
                             phost,
                             MSC_Machine.MSBulkInEp,
                             MSC_Machine.hc_num_in);
    break;
  case USBH_MSC_DIR_OUT :
    status = USBH_ClrFeature(pdev, 
                             phost,
                             MSC_Machine.MSBulkOutEp,
                             MSC_Machine.hc_num_out);
    break;
  default:
    break;
  }
  BOTStallErrorCount++; 
  if (BOTStallErrorCount > MAX_BULK_STALL_COUNT_LIMIT )
  {
    status = USBH_UNRECOVERED_ERROR;
  }
  return status;
}