sources/common/libs/STM32Cube_F4/Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c
/**
  * @brief  USBD_CUSTOM_HID_GetOtherSpeedCfgDesc
  *         return other speed configuration descriptor
  * @param  speed : current device speed
  * @param  length : pointer data length
  * @retval pointer to descriptor buffer
  */
@brief  USBD_CUSTOM_HID_GetOtherSpeedCfgDesc
return other speed configuration descriptor
@param  speed : current device speed
@param  length : pointer data length
@retval pointer to descriptor buffer
@brief USBD_CUSTOM_HID_GetOtherSpeedCfgDesc return other speed configuration descriptor @param speed : current device speed @param length : pointer data length @retval pointer to descriptor buffer
static uint8_t *USBD_CUSTOM_HID_GetOtherSpeedCfgDesc(uint16_t *length)
{
  USBD_EpDescTypeDef *pEpInDesc = USBD_GetEpDesc(USBD_CUSTOM_HID_CfgDesc, CUSTOM_HID_EPIN_ADDR);
  USBD_EpDescTypeDef *pEpOutDesc = USBD_GetEpDesc(USBD_CUSTOM_HID_CfgDesc, CUSTOM_HID_EPOUT_ADDR);
  if (pEpInDesc != NULL)
  {
    pEpInDesc->wMaxPacketSize = CUSTOM_HID_EPIN_SIZE;
    pEpInDesc->bInterval = CUSTOM_HID_FS_BINTERVAL;
  }
  if (pEpOutDesc != NULL)
  {
    pEpOutDesc->wMaxPacketSize = CUSTOM_HID_EPOUT_SIZE;
    pEpOutDesc->bInterval = CUSTOM_HID_FS_BINTERVAL;
  }
  *length = (uint16_t)sizeof(USBD_CUSTOM_HID_CfgDesc);
  return USBD_CUSTOM_HID_CfgDesc;
}
static uint8_t * USBD_CUSTOM_HID_GetOtherSpeedCfgDesc ( uint16_t * length ) { USBD_EpDescTypeDef * pEpInDesc = USBD_GetEpDesc ( USBD_CUSTOM_HID_CfgDesc , CUSTOM_HID_EPIN_ADDR ) ; USBD_EpDescTypeDef * pEpOutDesc = USBD_GetEpDesc ( USBD_CUSTOM_HID_CfgDesc , CUSTOM_HID_EPOUT_ADDR ) ; if ( pEpInDesc != NULL ) { pEpInDesc -> wMaxPacketSize = CUSTOM_HID_EPIN_SIZE ; pEpInDesc -> bInterval = CUSTOM_HID_FS_BINTERVAL ; } if ( pEpOutDesc != NULL ) { pEpOutDesc -> wMaxPacketSize = CUSTOM_HID_EPOUT_SIZE ; pEpOutDesc -> bInterval = CUSTOM_HID_FS_BINTERVAL ; } * length = ( uint16_t ) sizeof ( USBD_CUSTOM_HID_CfgDesc ) ; return USBD_CUSTOM_HID_CfgDesc ; }
@brief  USBD_CUSTOM_HID_GetOtherSpeedCfgDesc
         return other speed configuration descriptor
 @param  speed : current device speed
 @param  length : pointer data length
 @retval pointer to descriptor buffer
@brief USBD_CUSTOM_HID_GetOtherSpeedCfgDesc return other speed configuration descriptor @param speed : current device speed @param length : pointer data length @retval pointer to descriptor buffer