/* Initializes the Low Level portion of the Device driver.  */
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
/* Initializes the Low Level portion of the Device driver.  */
USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
{
  hpcd.Instance = USB_OTG_FS;
  hpcd.Init.dev_endpoints = 4;
  hpcd.Init.use_dedicated_ep1 = 0;
  hpcd.Init.dma_enable = 0;
  hpcd.Init.low_power_enable = 0;
  hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
  hpcd.Init.Sof_enable = 0;
  hpcd.Init.speed = PCD_SPEED_FULL;
  hpcd.Init.vbus_sensing_enable = 1;
  hpcd.Init.lpm_enable = 0;
  hpcd.pData = pdev;
  pdev->pData = &hpcd;
  HAL_PCD_Init(&hpcd);
  HAL_PCDEx_SetRxFiFo(&hpcd, 0xA0);
  HAL_PCDEx_SetTxFiFo(&hpcd, 0, 0xA0);
  return USBD_OK;
}