• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ HAL_HCD_GetCurrentFrame函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中HAL_HCD_GetCurrentFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_HCD_GetCurrentFrame函数的具体用法?C++ HAL_HCD_GetCurrentFrame怎么用?C++ HAL_HCD_GetCurrentFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了HAL_HCD_GetCurrentFrame函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: USBH_LL_Init

/**
  * @brief  USBH_LL_Init 
  *         Initialize the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{
  if(phost->id == 0) 
  {
    /* Set the LL Driver parameters */
    hhcd_FS.Instance = USB_OTG_FS;
    hhcd_FS.Init.Host_channels = 11; 
    hhcd_FS.Init.dma_enable = 0;
    hhcd_FS.Init.low_power_enable = 0;
    hhcd_FS.Init.phy_itface = HCD_PHY_EMBEDDED; 
    hhcd_FS.Init.Sof_enable = 0;
    hhcd_FS.Init.speed = HCD_SPEED_FULL;
    hhcd_FS.Init.vbus_sensing_enable = 0;
    hhcd_FS.Init.lpm_enable = 0;
    
    /* Link the driver to the stack */
    hhcd_FS.pData = phost;
    phost->pData = &hhcd_FS;
    
    /* Initialize the LL Driver */
    HAL_HCD_Init(&hhcd_FS);
  }
  else /*phost->id == 1*/
  {
    /* Set the LL driver parameters */
    hhcd_HS.Instance = USB_OTG_HS;
    hhcd_HS.Init.Host_channels = 11; 
    hhcd_HS.Init.dma_enable = 1;
    hhcd_HS.Init.low_power_enable = 0;
    
#ifdef USE_USB_HS_IN_FS
    hhcd_HS.Init.phy_itface = HCD_PHY_EMBEDDED; 
#else
    hhcd_HS.Init.phy_itface = HCD_PHY_ULPI; 
#endif
    hhcd_HS.Init.Sof_enable = 0;
    hhcd_HS.Init.speed = HCD_SPEED_HIGH;
    hhcd_HS.Init.vbus_sensing_enable = 0;
    hhcd_HS.Init.use_external_vbus = 1;
    hhcd_HS.Init.lpm_enable = 0;
    
    /* Link the driver to the stack */
    hhcd_HS.pData = phost;
    phost->pData = &hhcd_HS;
    
    /* Initialize the LL driver */
    HAL_HCD_Init(&hhcd_HS);
  }
  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd_HS));
  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd_FS));
  
  return USBH_OK;
}
开发者ID:vlsi1217,项目名称:STM32F7Cube,代码行数:59,代码来源:usbh_conf.c


示例2: USBH_LL_Init

/**
  * @brief  Initializes the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{ 
#ifdef USE_USB_FS  
  /* Set the LL Driver parameters */
  hhcd.Instance = USB_OTG_FS;
  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_FULL;
  hhcd.Init.vbus_sensing_enable = 0;
  hhcd.Init.lpm_enable = 0;
  
  /* Link the driver to the stack */
  hhcd.pData = phost;
  phost->pData = &hhcd;
  
  /* Initialize the LL Driver */
  HAL_HCD_Init(&hhcd);
#endif 
  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd));
  
  return USBH_OK;
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:30,代码来源:usbh_conf.c


示例3: USBH_LL_Init

/**
  * @brief  Initializes the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{  
  /*Set LL Driver parameters */
  hhcd.Instance = USB_OTG_HS;
  hhcd.Init.Host_channels = 11; 
  hhcd.Init.dma_enable = 1;
  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.vbus_sensing_enable = 0;
  hhcd.Init.use_external_vbus = 1;  
  /* Link The driver to the stack */
  hhcd.pData = phost;
  phost->pData = &hhcd;
  /*Initialize LL Driver */
  if (HAL_HCD_Init(&hhcd) != HAL_OK)
  {
    return USBH_FAIL;
  }
  
  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd));
  
  return USBH_OK;
}
开发者ID:chsigi,项目名称:blindschleiche,代码行数:30,代码来源:usbh_conf.c


示例4: USBH_LL_Init

/**
 * @brief  USBH_LL_Init
 *         Initialize the Low Level portion of the Host driver.
 * @param  phost: Host handle
 * @retval USBH Status
 */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost) {
  /* Change Systick prioity */
  //HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
  RCC->AHB1ENR |= RCC_AHB1ENR_OTGHSEN;
  RCC->AHB1LPENR |= RCC_AHB1LPENR_OTGHSLPEN;

  /*Set LL Driver parameters */
  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_FULL;
  hHCD.Init.vbus_sensing_enable = 0;
  /* Link The driver to the stack */
  hHCD.pData = phost;
  phost->pData = &hHCD;
  /*Initialize LL Driver */
  HAL_HCD_Init(&hHCD);

//  USB_OTG_HS->GUSBCFG |= USB_OTG_GUSBCFG_FHMOD;
  USBH_LL_SetTimer(phost, HAL_HCD_GetCurrentFrame(&hHCD));

  return USBH_OK;
}
开发者ID:AndrewCapon,项目名称:axoloti,代码行数:32,代码来源:usbh_conf.c


示例5: USBH_LL_Init

/**
  * @brief  USBH_LL_Init 
  *         Initialize the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef  USBH_LL_Init (USBH_HandleTypeDef *phost)
{
  /* Init USB_IP */
  if (phost->id == HOST_HS) {
  /* Link The driver to the stack */
  hhcd_USB_OTG_HS.pData = phost;
  phost->pData = &hhcd_USB_OTG_HS;

  hhcd_USB_OTG_HS.Instance = USB_OTG_HS;
  hhcd_USB_OTG_HS.Init.dev_endpoints = 6;
  hhcd_USB_OTG_HS.Init.Host_channels = 12;
  hhcd_USB_OTG_HS.Init.speed = HCD_SPEED_FULL;
  hhcd_USB_OTG_HS.Init.dma_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.phy_itface = USB_OTG_EMBEDDED_PHY;
  hhcd_USB_OTG_HS.Init.Sof_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.low_power_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.vbus_sensing_enable = DISABLE;
  hhcd_USB_OTG_HS.Init.use_external_vbus = DISABLE;
  if (HAL_HCD_Init(&hhcd_USB_OTG_HS) != HAL_OK)
  {
    Error_Handler();
  }

  USBH_LL_SetTimer (phost, HAL_HCD_GetCurrentFrame(&hhcd_USB_OTG_HS));
  }
  return USBH_OK;
}
开发者ID:jhgorse,项目名称:STM32F429ZITx_cube_usbh_hid,代码行数:33,代码来源:usbh_conf.c


示例6: USBH_LL_Init

/**
  * @brief  Initializes the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{
#ifdef USE_USB_FS  
  /* Set the LL driver parameters */
  hhcd.Instance = USB_OTG_FS;
  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;
  /* Link the driver to the stack */
  hhcd.pData = phost;
  phost->pData = &hhcd;
  /* Initialize the LL Driver */
  HAL_HCD_Init(&hhcd);
#endif 
#ifdef USE_USB_HS  
  /* Set the LL driver parameters */
  hhcd.Instance = USB_OTG_HS;
  hhcd.Init.Host_channels = 11; 
  hhcd.Init.dma_enable = 0;
  hhcd.Init.low_power_enable = 0;
#ifdef USE_USB_HS_IN_FS
  hhcd.Init.phy_itface = HCD_PHY_EMBEDDED; 
#else  
  hhcd.Init.phy_itface = HCD_PHY_ULPI; 
#endif  
  hhcd.Init.Sof_enable = 0;
  hhcd.Init.speed = HCD_SPEED_HIGH;
  hhcd.Init.use_external_vbus = 1;  
  /* Link the driver to the stack */
  hhcd.pData = phost;
  phost->pData = &hhcd;
  /* Initialize the LL driver */
  HAL_HCD_Init(&hhcd);
  
#endif /*USE_USB_HS*/ 
  USBH_LL_SetTimer(phost, HAL_HCD_GetCurrentFrame(&hhcd));
  
  return USBH_OK;
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:46,代码来源:usbh_conf.c


示例7: USBH_LL_Init

/**
  * @brief  Initializes the Low Level portion of the Host driver.
  * @param  phost: Host handle
  * @retval USBH Status
  */
USBH_StatusTypeDef USBH_LL_Init(USBH_HandleTypeDef *phost)
{
    /* Set the LL driver parameters */
    handleHCD.Instance = USB_OTG_FS;
    handleHCD.Init.speed = HCD_SPEED_FULL;
    handleHCD.Init.Host_channels = 11;
    handleHCD.Init.dma_enable = 0;
    handleHCD.Init.low_power_enable = 0;
    handleHCD.Init.phy_itface = HCD_PHY_EMBEDDED;
    handleHCD.Init.Sof_enable = 0;
    handleHCD.Init.vbus_sensing_enable = 0;
    handleHCD.Init.use_external_vbus = 0;

    /* Link the driver to the stack */
    handleHCD.pData = phost;
    phost->pData = &handleHCD;
    /* Initialize the LL driver */
    HAL_HCD_Init(&handleHCD);

    USBH_LL_SetTimer(phost, HAL_HCD_GetCurrentFrame(&handleHCD));

    return USBH_OK;
}
开发者ID:Sasha7b9,项目名称:Osci,代码行数:28,代码来源:usbh_conf.c



注:本文中的HAL_HCD_GetCurrentFrame函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HAL_HCD_HC_SubmitRequest函数代码示例发布时间:2022-05-30
下一篇:
C++ HAL_GetTick函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap