sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/MSC/Src/usbd_msc_bot.c
/**
  * @brief  MSC_BOT_CplClrFeature
  *         Complete the clear feature request
  * @param  pdev: device instance
  * @param  epnum: endpoint index
  * @retval None
  */
@brief  MSC_BOT_CplClrFeature
Complete the clear feature request
@param  pdev: device instance
@param  epnum: endpoint index
@retval None
@brief MSC_BOT_CplClrFeature Complete the clear feature request @param pdev : device instance @param epnum : endpoint index @retval None
void  MSC_BOT_CplClrFeature(USBD_HandleTypeDef *pdev, uint8_t epnum)
{
  USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
#ifdef USE_USBD_COMPOSITE
  MSCInEpAdd  = USBD_CoreGetEPAdd(pdev, USBD_EP_IN, USBD_EP_TYPE_BULK);
  MSCOutEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_OUT, USBD_EP_TYPE_BULK);
#endif 
  if (hmsc == NULL)
  {
    return;
  }
  if (hmsc->bot_status == USBD_BOT_STATUS_ERROR) 
  {
    (void)USBD_LL_StallEP(pdev, MSCInEpAdd);
    (void)USBD_LL_StallEP(pdev, MSCOutEpAdd);
  }
  else if (((epnum & 0x80U) == 0x80U) && (hmsc->bot_status != USBD_BOT_STATUS_RECOVERY))
  {
    MSC_BOT_SendCSW(pdev, USBD_CSW_CMD_FAILED);
  }
  else
  {
    return;
  }
}
void MSC_BOT_CplClrFeature ( USBD_HandleTypeDef * pdev , uint8_t epnum ) { USBD_MSC_BOT_HandleTypeDef * hmsc = ( USBD_MSC_BOT_HandleTypeDef * ) pdev -> pClassDataCmsit [ pdev -> classId ] ; #ifdef USE_USBD_COMPOSITE MSCInEpAdd = USBD_CoreGetEPAdd ( pdev , USBD_EP_IN , USBD_EP_TYPE_BULK ) ; MSCOutEpAdd = USBD_CoreGetEPAdd ( pdev , USBD_EP_OUT , USBD_EP_TYPE_BULK ) ; #endif if ( hmsc == NULL ) { return ; } if ( hmsc -> bot_status == USBD_BOT_STATUS_ERROR ) { ( void ) USBD_LL_StallEP ( pdev , MSCInEpAdd ) ; ( void ) USBD_LL_StallEP ( pdev , MSCOutEpAdd ) ; } else if ( ( ( epnum & 0x80U ) == 0x80U ) && ( hmsc -> bot_status != USBD_BOT_STATUS_RECOVERY ) ) { MSC_BOT_SendCSW ( pdev , USBD_CSW_CMD_FAILED ) ; } else { return ; } }
@brief  MSC_BOT_CplClrFeature
         Complete the clear feature request
 @param  pdev: device instance
 @param  epnum: endpoint index
 @retval None
@brief MSC_BOT_CplClrFeature Complete the clear feature request @param pdev : device instance @param epnum : endpoint index @retval None
/* Get the Endpoints addresses allocated for this class instance */ /* USE_USBD_COMPOSITE */ /* Bad CBW Signature */