STM32L4xx_HAL_Driver  1.14.0
Peripheral Control functions

Management functions. More...

Functions

HAL_StatusTypeDef HAL_HCD_ResetPort (HCD_HandleTypeDef *hhcd)
 Reset the host port. More...
 
HAL_StatusTypeDef HAL_HCD_Start (HCD_HandleTypeDef *hhcd)
 Start the host driver. More...
 
HAL_StatusTypeDef HAL_HCD_Stop (HCD_HandleTypeDef *hhcd)
 Stop the host driver. More...
 

Detailed Description

Management functions.

 ===============================================================================
                      ##### Peripheral Control functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the HCD data
    transfers.

Function Documentation

◆ HAL_HCD_ResetPort()

HAL_StatusTypeDef HAL_HCD_ResetPort ( HCD_HandleTypeDef hhcd)

Reset the host port.

Parameters
hhcdHCD handle
Return values
HALstatus

Definition at line 1030 of file stm32l4xx_hal_hcd.c.

1031 {
1032  return (USB_ResetPort(hhcd->Instance));
1033 }
HAL_StatusTypeDef USB_ResetPort(USB_OTG_GlobalTypeDef *USBx)
USB_OTG_ResetPort : Reset Host Port.

◆ HAL_HCD_Start()

HAL_StatusTypeDef HAL_HCD_Start ( HCD_HandleTypeDef hhcd)

Start the host driver.

Parameters
hhcdHCD handle
Return values
HALstatus

Definition at line 1002 of file stm32l4xx_hal_hcd.c.

1003 {
1004  __HAL_LOCK(hhcd);
1005  __HAL_HCD_ENABLE(hhcd);
1006  (void)USB_DriveVbus(hhcd->Instance, 1U);
1007  __HAL_UNLOCK(hhcd);
1008  return HAL_OK;
1009 }
HAL_StatusTypeDef USB_DriveVbus(USB_OTG_GlobalTypeDef *USBx, uint8_t state)
USB_DriveVbus : activate or de-activate vbus.
__HAL_UNLOCK(hrtc)
__HAL_LOCK(hrtc)
return HAL_OK

◆ HAL_HCD_Stop()

HAL_StatusTypeDef HAL_HCD_Stop ( HCD_HandleTypeDef hhcd)

Stop the host driver.

Parameters
hhcdHCD handle
Return values
HALstatus

Definition at line 1017 of file stm32l4xx_hal_hcd.c.

1018 {
1019  __HAL_LOCK(hhcd);
1020  (void)USB_StopHost(hhcd->Instance);
1021  __HAL_UNLOCK(hhcd);
1022  return HAL_OK;
1023 }
__HAL_UNLOCK(hrtc)
__HAL_LOCK(hrtc)
return HAL_OK
HAL_StatusTypeDef USB_StopHost(USB_OTG_GlobalTypeDef *USBx)
Stop Host Core.