/* Initializes the Low Level portion of the Host driver.  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
/* Initializes the Low Level portion of the Host driver.  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{
  hhcd.Instance = USB_OTG_HS;
  hhcd.Init.Host_channels = 11; 
  hhcd.Init.dma_enable = 0;
  hhcd.Init.low_power_enable = 0;
  hhcd.Init.phy_itface = HCD_PHY_EMBEDDED;
  hhcd.Init.Sof_enable = 0;
  hhcd.Init.speed = HCD_SPEED_HIGH;
  hhcd.Init.use_external_vbus = 1;
  hhcd.pData = phost;
  phost->pData = &hhcd;
  if (HAL_HCD_Init(&hhcd) != HAL_OK)
  {
    return USBH_FAIL;
  }
  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd));
  return USBH_OK;
}