KugleFirmware/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
/**
  * @brief  USBD_CDC_ReceivePacket
  *         prepare OUT Endpoint for reception
  * @param  pdev: device instance
  * @retval status
  */
@brief  USBD_CDC_ReceivePacket
prepare OUT Endpoint for reception
@param  pdev: device instance
@retval status
@brief USBD_CDC_ReceivePacket prepare OUT Endpoint for reception @param pdev : device instance @retval status
uint8_t  USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev)
{      
  USBD_CDC_HandleTypeDef   *hcdc = (USBD_CDC_HandleTypeDef*) pdev->pClassData;
  if(pdev->pClassData != NULL)
  {
    if(pdev->dev_speed == USBD_SPEED_HIGH  ) 
    {      
      USBD_LL_PrepareReceive(pdev,
                             CDC_OUT_EP,
                             hcdc->RxBuffer,
                             CDC_DATA_HS_OUT_PACKET_SIZE);
    }
    else
    {
      USBD_LL_PrepareReceive(pdev,
                             CDC_OUT_EP,
                             hcdc->RxBuffer,
                             CDC_DATA_FS_OUT_PACKET_SIZE);
    }
    return USBD_OK;
  }
  else
  {
    return USBD_FAIL;
  }
}
uint8_t USBD_CDC_ReceivePacket ( USBD_HandleTypeDef * pdev ) { USBD_CDC_HandleTypeDef * hcdc = ( USBD_CDC_HandleTypeDef * ) pdev -> pClassData ; if ( pdev -> pClassData != NULL ) { if ( pdev -> dev_speed == USBD_SPEED_HIGH ) { USBD_LL_PrepareReceive ( pdev , CDC_OUT_EP , hcdc -> RxBuffer , CDC_DATA_HS_OUT_PACKET_SIZE ) ; } else { USBD_LL_PrepareReceive ( pdev , CDC_OUT_EP , hcdc -> RxBuffer , CDC_DATA_FS_OUT_PACKET_SIZE ) ; } return USBD_OK ; } else { return USBD_FAIL ; } }
@brief  USBD_CDC_ReceivePacket
         prepare OUT Endpoint for reception
 @param  pdev: device instance
 @retval status
@brief USBD_CDC_ReceivePacket prepare OUT Endpoint for reception @param pdev : device instance @retval status
/* Suspend or Resume USB Out process */ /* Prepare Out endpoint to receive next packet */ /* Prepare Out endpoint to receive next packet */