本文整理汇总了C++中USBD_LL_SetSpeed函数的典型用法代码示例。如果您正苦于以下问题:C++ USBD_LL_SetSpeed函数的具体用法?C++ USBD_LL_SetSpeed怎么用?C++ USBD_LL_SetSpeed使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了USBD_LL_SetSpeed函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HAL_PCD_ResetCallback
/**
* @brief Reset callback.
* @param hpcd: PCD handle
* @retval None
*/
void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
{
USBD_SpeedTypeDef speed = USBD_SPEED_FULL;
/* Set USB Current Speed */
switch(hpcd->Init.speed)
{
case PCD_SPEED_HIGH:
speed = USBD_SPEED_HIGH;
break;
case PCD_SPEED_FULL:
speed = USBD_SPEED_FULL;
break;
default:
speed = USBD_SPEED_FULL;
break;
}
/* Reset Device */
USBD_LL_Reset(hpcd->pData);
USBD_LL_SetSpeed(hpcd->pData, speed);
}
示例2: HAL_PCD_ResetCallback
void HAL_PCD_ResetCallback( PCD_HandleTypeDef *hpcd )
{
USBD_SpeedTypeDef speed = USBD_SPEED_FULL; // atu: only full
USBD_LL_SetSpeed( (USBD_HandleTypeDef*)hpcd->pData, speed );
USBD_LL_Reset( (USBD_HandleTypeDef*)hpcd->pData );
}
示例3: HAL_PCD_ResetCallback
/**
* @brief Reset callback.
* @param hpcd: PCD handle
* @retval None
*/
void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
{
USBD_LL_SetSpeed(hpcd->pData, USBD_SPEED_FULL);
/* Reset Device */
USBD_LL_Reset(hpcd->pData);
}
示例4: HAL_PCD_ResetCallback
void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
{
USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, USBD_SPEED_FULL);
USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);
}