sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c
/**
  * @brief  USBD_CUSTOM_HID_ReceivePacket
  *         prepare OUT Endpoint for reception
  * @param  pdev: device instance
  * @retval status
  */
@brief  USBD_CUSTOM_HID_ReceivePacket
prepare OUT Endpoint for reception
@param  pdev: device instance
@retval status
@brief USBD_CUSTOM_HID_ReceivePacket prepare OUT Endpoint for reception @param pdev : device instance @retval status
uint8_t USBD_CUSTOM_HID_ReceivePacket(USBD_HandleTypeDef *pdev)
{
  USBD_CUSTOM_HID_HandleTypeDef *hhid;
  if (pdev->pClassDataCmsit[pdev->classId] == NULL)
  {
    return (uint8_t)USBD_FAIL;
  }
#ifdef USE_USBD_COMPOSITE
  CUSTOMHIDOutEpAdd = USBD_CoreGetEPAdd(pdev, USBD_EP_OUT, USBD_EP_TYPE_INTR);
#endif 
  hhid = (USBD_CUSTOM_HID_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
  (void)USBD_LL_PrepareReceive(pdev, CUSTOMHIDOutEpAdd, hhid->Report_buf,
                               USBD_CUSTOMHID_OUTREPORT_BUF_SIZE);
  return (uint8_t)USBD_OK;
}
uint8_t USBD_CUSTOM_HID_ReceivePacket ( USBD_HandleTypeDef * pdev ) { USBD_CUSTOM_HID_HandleTypeDef * hhid ; if ( pdev -> pClassDataCmsit [ pdev -> classId ] == NULL ) { return ( uint8_t ) USBD_FAIL ; } #ifdef USE_USBD_COMPOSITE CUSTOMHIDOutEpAdd = USBD_CoreGetEPAdd ( pdev , USBD_EP_OUT , USBD_EP_TYPE_INTR ) ; #endif hhid = ( USBD_CUSTOM_HID_HandleTypeDef * ) pdev -> pClassDataCmsit [ pdev -> classId ] ; ( void ) USBD_LL_PrepareReceive ( pdev , CUSTOMHIDOutEpAdd , hhid -> Report_buf , USBD_CUSTOMHID_OUTREPORT_BUF_SIZE ) ; return ( uint8_t ) USBD_OK ; }
@brief  USBD_CUSTOM_HID_ReceivePacket
         prepare OUT Endpoint for reception
 @param  pdev: device instance
 @retval status
@brief USBD_CUSTOM_HID_ReceivePacket prepare OUT Endpoint for reception @param pdev : device instance @retval status
/* Get OUT Endpoint address allocated for this class instance */ /* USE_USBD_COMPOSITE */ /* Resume USB Out process */