/* 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;
  hpcd.Init.dev_endpoints = 8;
  hpcd.Init.ep0_mps = 0x40;
  hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
  hpcd.Init.speed = PCD_SPEED_FULL;
  hpcd.Init.low_power_enable = 0;
  hpcd.pData = pdev;
  pdev->pData = &hpcd;
  HAL_PCD_Init(&hpcd);
  HAL_PCDEx_PMAConfig(&hpcd , 0x00 , PCD_SNG_BUF, 0x18);
  HAL_PCDEx_PMAConfig(&hpcd , 0x80 , PCD_SNG_BUF, 0x58);
  HAL_PCDEx_PMAConfig(&hpcd , 0x81 , PCD_SNG_BUF, 0x100);  
  return USBD_OK;
}