STM32L486xx HAL User Manual
Functions
Peripheral Control functions
PCD Exported Functions

management functions More...

Functions

HAL_StatusTypeDef HAL_PCD_DevConnect (PCD_HandleTypeDef *hpcd)
 Connect the USB device.
HAL_StatusTypeDef HAL_PCD_DevDisconnect (PCD_HandleTypeDef *hpcd)
 Disconnect the USB device.
HAL_StatusTypeDef HAL_PCD_SetAddress (PCD_HandleTypeDef *hpcd, uint8_t address)
 Set the USB Device address.
HAL_StatusTypeDef HAL_PCD_EP_Open (PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
 Open and configure an endpoint.
HAL_StatusTypeDef HAL_PCD_EP_Close (PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
 Deactivate an endpoint.
HAL_StatusTypeDef HAL_PCD_EP_Receive (PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len)
 Receive an amount of data.
uint16_t HAL_PCD_EP_GetRxCount (PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
 Get Received Data Size.
HAL_StatusTypeDef HAL_PCD_EP_Transmit (PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len)
 Send an amount of data.
HAL_StatusTypeDef HAL_PCD_EP_SetStall (PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
 Set a STALL condition over an endpoint.
HAL_StatusTypeDef HAL_PCD_EP_ClrStall (PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
 Clear a STALL condition over in an endpoint.
HAL_StatusTypeDef HAL_PCD_EP_Flush (PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
 Flush an endpoint.
HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup (PCD_HandleTypeDef *hpcd)
 Activate remote wakeup signalling.
HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup (PCD_HandleTypeDef *hpcd)
 De-activate remote wakeup signalling.

Detailed Description

management functions

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


Function Documentation

HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup ( PCD_HandleTypeDef hpcd)

Activate remote wakeup signalling.

Parameters:
hpcdPCD handle
Return values:
HALstatus

Definition at line 2096 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance.

HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup ( PCD_HandleTypeDef hpcd)

De-activate remote wakeup signalling.

Parameters:
hpcdPCD handle
Return values:
HALstatus

Definition at line 2106 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance.

HAL_StatusTypeDef HAL_PCD_DevConnect ( PCD_HandleTypeDef hpcd)

Connect the USB device.

Parameters:
hpcdPCD handle
Return values:
HALstatus

Definition at line 1804 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance.

HAL_StatusTypeDef HAL_PCD_DevDisconnect ( PCD_HandleTypeDef hpcd)

Disconnect the USB device.

Parameters:
hpcdPCD handle
Return values:
HALstatus

Definition at line 1817 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance.

HAL_StatusTypeDef HAL_PCD_EP_Close ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr 
)

Deactivate an endpoint.

Parameters:
hpcdPCD handle
ep_addrendpoint address
Return values:
HALstatus

Definition at line 1891 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::IN_ep, __PCD_HandleTypeDef::Instance, and __PCD_HandleTypeDef::OUT_ep.

HAL_StatusTypeDef HAL_PCD_EP_ClrStall ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr 
)

Clear a STALL condition over in an endpoint.

Parameters:
hpcdPCD handle
ep_addrendpoint address
Return values:
HALstatus

Definition at line 2037 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::IN_ep, __PCD_HandleTypeDef::Init, __PCD_HandleTypeDef::Instance, and __PCD_HandleTypeDef::OUT_ep.

HAL_StatusTypeDef HAL_PCD_EP_Flush ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr 
)

Flush an endpoint.

Parameters:
hpcdPCD handle
ep_addrendpoint address
Return values:
HALstatus

Definition at line 2073 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance.

uint16_t HAL_PCD_EP_GetRxCount ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr 
)

Get Received Data Size.

Parameters:
hpcdPCD handle
ep_addrendpoint address
Return values:
DataSize

Definition at line 1953 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::OUT_ep.

HAL_StatusTypeDef HAL_PCD_EP_Open ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr,
uint16_t  ep_mps,
uint8_t  ep_type 
)

Open and configure an endpoint.

Parameters:
hpcdPCD handle
ep_addrendpoint address
ep_mpsendpoint max packet size
ep_typeendpoint type
Return values:
HALstatus

Definition at line 1847 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::IN_ep, __PCD_HandleTypeDef::Instance, and __PCD_HandleTypeDef::OUT_ep.

HAL_StatusTypeDef HAL_PCD_EP_Receive ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr,
uint8_t *  pBuf,
uint32_t  len 
)

Receive an amount of data.

Parameters:
hpcdPCD handle
ep_addrendpoint address
pBufpointer to the reception buffer
lenamount of data to be received
Return values:
HALstatus

Definition at line 1922 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance, and __PCD_HandleTypeDef::OUT_ep.

HAL_StatusTypeDef HAL_PCD_EP_SetStall ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr 
)

Set a STALL condition over an endpoint.

Parameters:
hpcdPCD handle
ep_addrendpoint address
Return values:
HALstatus

Definition at line 1996 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::IN_ep, __PCD_HandleTypeDef::Init, __PCD_HandleTypeDef::Instance, __PCD_HandleTypeDef::OUT_ep, and __PCD_HandleTypeDef::Setup.

HAL_StatusTypeDef HAL_PCD_EP_Transmit ( PCD_HandleTypeDef hpcd,
uint8_t  ep_addr,
uint8_t *  pBuf,
uint32_t  len 
)

Send an amount of data.

Parameters:
hpcdPCD handle
ep_addrendpoint address
pBufpointer to the transmission buffer
lenamount of data to be sent
Return values:
HALstatus

Definition at line 1965 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::IN_ep, and __PCD_HandleTypeDef::Instance.

HAL_StatusTypeDef HAL_PCD_SetAddress ( PCD_HandleTypeDef hpcd,
uint8_t  address 
)

Set the USB Device address.

Parameters:
hpcdPCD handle
addressnew device address
Return values:
HALstatus

Definition at line 1831 of file stm32l4xx_hal_pcd.c.

References __PCD_HandleTypeDef::Instance, and __PCD_HandleTypeDef::USB_Address.