本文整理汇总了C++中HAL_PCD_Stop函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_PCD_Stop函数的具体用法?C++ HAL_PCD_Stop怎么用?C++ HAL_PCD_Stop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HAL_PCD_Stop函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: USBD_LL_Stop
/**
* @brief Stops the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
{
HAL_PCD_Stop(pdev->pData);
//ui_led_ctl( &ui_led_usb, UI_LED_MODE_OFF );
return USBD_OK;
}
示例2: USBD_LL_Stop
/**
* @brief Stops the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Stop (USBD_HandleTypeDef *pdev)
{
HAL_StatusTypeDef hal_status = HAL_OK;
USBD_StatusTypeDef usb_status = USBD_OK;
hal_status = HAL_PCD_Stop(pdev->pData);
switch (hal_status) {
case HAL_OK :
usb_status = USBD_OK;
break;
case HAL_ERROR :
usb_status = USBD_FAIL;
break;
case HAL_BUSY :
usb_status = USBD_BUSY;
break;
case HAL_TIMEOUT :
usb_status = USBD_FAIL;
break;
default :
usb_status = USBD_FAIL;
break;
}
return usb_status;
}
示例3: usbc_set_active
status_t usbc_set_active(bool active)
{
LTRACEF("active %u\n", active);
if (active) {
HAL_PCD_Start(&usbc.handle);
} else {
HAL_PCD_Stop(&usbc.handle);
}
return NO_ERROR;
}
示例4: HAL_PCD_DeInit
/**
* @brief DeInitializes the PCD peripheral
* @param hpcd: PCD handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_PCD_DeInit(PCD_HandleTypeDef * hpcd)
{
/* Check the PCD handle allocation */
if (hpcd == NULL) {
return HAL_ERROR;
}
hpcd->State = PCD_BUSY;
/* Stop Device */
HAL_PCD_Stop(hpcd);
/* DeInit the low level hardware */
HAL_PCD_MspDeInit(hpcd);
hpcd->State = PCD_READY;
return HAL_OK;
}
示例5: USBD_LL_Stop
/**
* @brief Stops the Low Level portion of the Device driver.
* @param pdev: Device handle
* @retval USBD Status
*/
USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev)
{
HAL_PCD_Stop(pdev->pData);
return USBD_OK;
}