|
STM32L4xx_HAL_Driver
1.14.0
|
Initialization and Configuration functions. More...
Functions | |
| HAL_StatusTypeDef | USB_CoreInit (USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) |
| Initializes the USB Core. More... | |
| HAL_StatusTypeDef | USB_SetTurnaroundTime (USB_OTG_GlobalTypeDef *USBx, uint32_t hclk, uint8_t speed) |
| Set the USB turnaround time. More... | |
| HAL_StatusTypeDef | USB_EnableGlobalInt (USB_OTG_GlobalTypeDef *USBx) |
| USB_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg. More... | |
| HAL_StatusTypeDef | USB_DisableGlobalInt (USB_OTG_GlobalTypeDef *USBx) |
| USB_DisableGlobalInt Disable the controller's Global Int in the AHB Config reg. More... | |
| HAL_StatusTypeDef | USB_SetCurrentMode (USB_OTG_GlobalTypeDef *USBx, USB_ModeTypeDef mode) |
| USB_SetCurrentMode : Set functional mode. More... | |
| HAL_StatusTypeDef | USB_DevInit (USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) |
| USB_DevInit : Initializes the USB_OTG controller registers for device mode. More... | |
| HAL_StatusTypeDef | USB_FlushTxFifo (USB_OTG_GlobalTypeDef *USBx, uint32_t num) |
| USB_OTG_FlushTxFifo : Flush a Tx FIFO. More... | |
| HAL_StatusTypeDef | USB_FlushRxFifo (USB_OTG_GlobalTypeDef *USBx) |
| USB_FlushRxFifo : Flush Rx FIFO. More... | |
| HAL_StatusTypeDef | USB_SetDevSpeed (USB_OTG_GlobalTypeDef *USBx, uint8_t speed) |
| USB_SetDevSpeed Initializes the DevSpd field of DCFG register depending the PHY type and the enumeration speed of the device. More... | |
| uint8_t | USB_GetDevSpeed (USB_OTG_GlobalTypeDef *USBx) |
| USB_GetDevSpeed Return the Dev Speed. More... | |
| HAL_StatusTypeDef | USB_ActivateEndpoint (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| Activate and configure an endpoint. More... | |
| HAL_StatusTypeDef | USB_ActivateDedicatedEndpoint (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| Activate and configure a dedicated endpoint. More... | |
| HAL_StatusTypeDef | USB_DeactivateEndpoint (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| De-activate and de-initialize an endpoint. More... | |
| HAL_StatusTypeDef | USB_DeactivateDedicatedEndpoint (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| De-activate and de-initialize a dedicated endpoint. More... | |
| HAL_StatusTypeDef | USB_EPStartXfer (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| USB_EPStartXfer : setup and starts a transfer over an EP. More... | |
| HAL_StatusTypeDef | USB_EP0StartXfer (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| USB_EP0StartXfer : setup and starts a transfer over the EP 0. More... | |
| HAL_StatusTypeDef | USB_WritePacket (USB_OTG_GlobalTypeDef *USBx, uint8_t *src, uint8_t ch_ep_num, uint16_t len) |
| USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel. More... | |
| void * | USB_ReadPacket (USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len) |
| USB_ReadPacket : read a packet from the RX FIFO. More... | |
| HAL_StatusTypeDef | USB_EPSetStall (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| USB_EPSetStall : set a stall condition over an EP. More... | |
| HAL_StatusTypeDef | USB_EPClearStall (USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep) |
| USB_EPClearStall : Clear a stall condition over an EP. More... | |
| HAL_StatusTypeDef | USB_StopDevice (USB_OTG_GlobalTypeDef *USBx) |
| USB_StopDevice : Stop the usb device mode. More... | |
| HAL_StatusTypeDef | USB_SetDevAddress (USB_OTG_GlobalTypeDef *USBx, uint8_t address) |
| USB_SetDevAddress : Stop the usb device mode. More... | |
| HAL_StatusTypeDef | USB_DevConnect (USB_OTG_GlobalTypeDef *USBx) |
| USB_DevConnect : Connect the USB device by enabling the pull-up/pull-down. More... | |
| HAL_StatusTypeDef | USB_DevDisconnect (USB_OTG_GlobalTypeDef *USBx) |
| USB_DevDisconnect : Disconnect the USB device by disabling the pull-up/pull-down. More... | |
| uint32_t | USB_ReadInterrupts (USB_OTG_GlobalTypeDef *USBx) |
| USB_ReadInterrupts: return the global USB interrupt status. More... | |
| uint32_t | USB_ReadDevAllOutEpInterrupt (USB_OTG_GlobalTypeDef *USBx) |
| USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status. More... | |
| uint32_t | USB_ReadDevAllInEpInterrupt (USB_OTG_GlobalTypeDef *USBx) |
| USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status. More... | |
| uint32_t | USB_ReadDevOutEPInterrupt (USB_OTG_GlobalTypeDef *USBx, uint8_t epnum) |
| Returns Device OUT EP Interrupt register. More... | |
| uint32_t | USB_ReadDevInEPInterrupt (USB_OTG_GlobalTypeDef *USBx, uint8_t epnum) |
| Returns Device IN EP Interrupt register. More... | |
| void | USB_ClearInterrupts (USB_OTG_GlobalTypeDef *USBx, uint32_t interrupt) |
| USB_ClearInterrupts: clear a USB interrupt. More... | |
| uint32_t | USB_GetMode (USB_OTG_GlobalTypeDef *USBx) |
| Returns USB core mode. More... | |
| HAL_StatusTypeDef | USB_ActivateSetup (USB_OTG_GlobalTypeDef *USBx) |
| Activate EP0 for Setup transactions. More... | |
| HAL_StatusTypeDef | USB_EP0_OutStart (USB_OTG_GlobalTypeDef *USBx, uint8_t *psetup) |
| Prepare the EP0 to start the first control setup. More... | |
| HAL_StatusTypeDef | USB_HostInit (USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg) |
| USB_HostInit : Initializes the USB OTG controller registers for Host mode. More... | |
| HAL_StatusTypeDef | USB_InitFSLSPClkSel (USB_OTG_GlobalTypeDef *USBx, uint8_t freq) |
| USB_InitFSLSPClkSel : Initializes the FSLSPClkSel field of the HCFG register on the PHY type and set the right frame interval. More... | |
| HAL_StatusTypeDef | USB_ResetPort (USB_OTG_GlobalTypeDef *USBx) |
| USB_OTG_ResetPort : Reset Host Port. More... | |
| HAL_StatusTypeDef | USB_DriveVbus (USB_OTG_GlobalTypeDef *USBx, uint8_t state) |
| USB_DriveVbus : activate or de-activate vbus. More... | |
| uint32_t | USB_GetHostSpeed (USB_OTG_GlobalTypeDef *USBx) |
| Return Host Core speed. More... | |
| uint32_t | USB_GetCurrentFrame (USB_OTG_GlobalTypeDef *USBx) |
| Return Host Current Frame number. More... | |
| HAL_StatusTypeDef | USB_HC_Init (USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num, uint8_t epnum, uint8_t dev_address, uint8_t speed, uint8_t ep_type, uint16_t mps) |
| Initialize a host channel. More... | |
| HAL_StatusTypeDef | USB_HC_StartXfer (USB_OTG_GlobalTypeDef *USBx, USB_OTG_HCTypeDef *hc) |
| Start a transfer over a host channel. More... | |
| uint32_t | USB_HC_ReadInterrupt (USB_OTG_GlobalTypeDef *USBx) |
| Read all host channel interrupts status. More... | |
| HAL_StatusTypeDef | USB_HC_Halt (USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num) |
| Halt a host channel. More... | |
| HAL_StatusTypeDef | USB_DoPing (USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num) |
| Initiate Do Ping protocol. More... | |
| HAL_StatusTypeDef | USB_StopHost (USB_OTG_GlobalTypeDef *USBx) |
| Stop Host Core. More... | |
| HAL_StatusTypeDef | USB_ActivateRemoteWakeup (USB_OTG_GlobalTypeDef *USBx) |
| USB_ActivateRemoteWakeup active remote wakeup signalling. More... | |
| HAL_StatusTypeDef | USB_DeActivateRemoteWakeup (USB_OTG_GlobalTypeDef *USBx) |
| USB_DeActivateRemoteWakeup de-active remote wakeup signalling. More... | |
| HAL_StatusTypeDef | USB_CoreInit (USB_TypeDef *USBx, USB_CfgTypeDef cfg) |
| Initializes the USB Core. More... | |
| HAL_StatusTypeDef | USB_EnableGlobalInt (USB_TypeDef *USBx) |
| USB_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg. More... | |
| HAL_StatusTypeDef | USB_DisableGlobalInt (USB_TypeDef *USBx) |
| USB_DisableGlobalInt Disable the controller's Global Int in the AHB Config reg. More... | |
| HAL_StatusTypeDef | USB_SetCurrentMode (USB_TypeDef *USBx, USB_ModeTypeDef mode) |
| USB_SetCurrentMode : Set functional mode. More... | |
| HAL_StatusTypeDef | USB_DevInit (USB_TypeDef *USBx, USB_CfgTypeDef cfg) |
| USB_DevInit : Initializes the USB controller registers for device mode. More... | |
| HAL_StatusTypeDef | USB_SetDevSpeed (USB_TypeDef *USBx, uint8_t speed) |
| USB_SetDevSpeed :Initializes the device speed depending on the PHY type and the enumeration speed of the device. More... | |
| HAL_StatusTypeDef | USB_FlushTxFifo (USB_TypeDef *USBx, uint32_t num) |
| USB_FlushTxFifo : Flush a Tx FIFO. More... | |
| HAL_StatusTypeDef | USB_FlushRxFifo (USB_TypeDef *USBx) |
| USB_FlushRxFifo : Flush Rx FIFO. More... | |
| HAL_StatusTypeDef | USB_ActivateEndpoint (USB_TypeDef *USBx, USB_EPTypeDef *ep) |
| Activate and configure an endpoint. More... | |
| HAL_StatusTypeDef | USB_DeactivateEndpoint (USB_TypeDef *USBx, USB_EPTypeDef *ep) |
| De-activate and de-initialize an endpoint. More... | |
| HAL_StatusTypeDef | USB_EPStartXfer (USB_TypeDef *USBx, USB_EPTypeDef *ep) |
| USB_EPStartXfer : setup and starts a transfer over an EP. More... | |
| HAL_StatusTypeDef | USB_WritePacket (USB_TypeDef *USBx, uint8_t *src, uint8_t ch_ep_num, uint16_t len) |
| USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel. More... | |
| void * | USB_ReadPacket (USB_TypeDef *USBx, uint8_t *dest, uint16_t len) |
| USB_ReadPacket : read a packet from the Tx FIFO associated with the EP/channel. More... | |
| HAL_StatusTypeDef | USB_EPSetStall (USB_TypeDef *USBx, USB_EPTypeDef *ep) |
| USB_EPSetStall : set a stall condition over an EP. More... | |
| HAL_StatusTypeDef | USB_EPClearStall (USB_TypeDef *USBx, USB_EPTypeDef *ep) |
| USB_EPClearStall : Clear a stall condition over an EP. More... | |
| HAL_StatusTypeDef | USB_StopDevice (USB_TypeDef *USBx) |
| USB_StopDevice : Stop the usb device mode. More... | |
| HAL_StatusTypeDef | USB_SetDevAddress (USB_TypeDef *USBx, uint8_t address) |
| USB_SetDevAddress : Stop the usb device mode. More... | |
| HAL_StatusTypeDef | USB_DevConnect (USB_TypeDef *USBx) |
| USB_DevConnect : Connect the USB device by enabling the pull-up/pull-down. More... | |
| HAL_StatusTypeDef | USB_DevDisconnect (USB_TypeDef *USBx) |
| USB_DevDisconnect : Disconnect the USB device by disabling the pull-up/pull-down. More... | |
| uint32_t | USB_ReadInterrupts (USB_TypeDef *USBx) |
| USB_ReadInterrupts: return the global USB interrupt status. More... | |
| uint32_t | USB_ReadDevAllOutEpInterrupt (USB_TypeDef *USBx) |
| USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status. More... | |
| uint32_t | USB_ReadDevAllInEpInterrupt (USB_TypeDef *USBx) |
| USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status. More... | |
| uint32_t | USB_ReadDevOutEPInterrupt (USB_TypeDef *USBx, uint8_t epnum) |
| Returns Device OUT EP Interrupt register. More... | |
| uint32_t | USB_ReadDevInEPInterrupt (USB_TypeDef *USBx, uint8_t epnum) |
| Returns Device IN EP Interrupt register. More... | |
| void | USB_ClearInterrupts (USB_TypeDef *USBx, uint32_t interrupt) |
| USB_ClearInterrupts: clear a USB interrupt. More... | |
| HAL_StatusTypeDef | USB_EP0_OutStart (USB_TypeDef *USBx, uint8_t *psetup) |
| Prepare the EP0 to start the first control setup. More... | |
| HAL_StatusTypeDef | USB_ActivateRemoteWakeup (USB_TypeDef *USBx) |
| USB_ActivateRemoteWakeup : active remote wakeup signalling. More... | |
| HAL_StatusTypeDef | USB_DeActivateRemoteWakeup (USB_TypeDef *USBx) |
| USB_DeActivateRemoteWakeup : de-active remote wakeup signalling. More... | |
| void | USB_WritePMA (USB_TypeDef *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) |
| Copy a buffer from user memory area to packet memory area (PMA) More... | |
| void | USB_ReadPMA (USB_TypeDef *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes) |
| Copy a buffer from user memory area to packet memory area (PMA) More... | |
| static HAL_StatusTypeDef | USB_CoreReset (USB_OTG_GlobalTypeDef *USBx) |
| Reset the USB Core (needed after USB clock settings change) More... | |
Initialization and Configuration functions.
===============================================================================
##### Initialization/de-initialization functions #####
=============================================================================== | HAL_StatusTypeDef USB_ActivateDedicatedEndpoint | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
Activate and configure a dedicated endpoint.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 530 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ActivateEndpoint | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
Activate and configure an endpoint.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 492 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ActivateEndpoint | ( | USB_TypeDef * | USBx, |
| USB_EPTypeDef * | ep | ||
| ) |
Activate and configure an endpoint.
| USBx | : Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 1975 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ActivateRemoteWakeup | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_ActivateRemoteWakeup active remote wakeup signalling.
| USBx | Selected device |
| HAL | status |
Definition at line 1760 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ActivateRemoteWakeup | ( | USB_TypeDef * | USBx | ) |
USB_ActivateRemoteWakeup : active remote wakeup signalling.
| USBx | Selected device |
| HAL | status |
Definition at line 2505 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ActivateSetup | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Activate EP0 for Setup transactions.
| USBx | Selected device |
| HAL | status |
Definition at line 1109 of file stm32l4xx_ll_usb.c.
| void USB_ClearInterrupts | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint32_t | interrupt | ||
| ) |
USB_ClearInterrupts: clear a USB interrupt.
| USBx | Selected device |
| interrupt | interrupt flag |
| None |
Definition at line 1086 of file stm32l4xx_ll_usb.c.
| void USB_ClearInterrupts | ( | USB_TypeDef * | USBx, |
| uint32_t | interrupt | ||
| ) |
USB_ClearInterrupts: clear a USB interrupt.
| USBx | Selected device |
| interrupt | interrupt flag |
| None |
Definition at line 2471 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_CoreInit | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_CfgTypeDef | cfg | ||
| ) |
Initializes the USB Core.
| USBx | USB Instance |
| cfg | pointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral. |
| HAL | status |
Definition at line 82 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_CoreInit | ( | USB_TypeDef * | USBx, |
| USB_CfgTypeDef | cfg | ||
| ) |
Initializes the USB Core.
| USBx | USB Instance |
| cfg | : pointer to a USB_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral. |
| HAL | status |
Definition at line 1797 of file stm32l4xx_ll_usb.c.
|
static |
Reset the USB Core (needed after USB clock settings change)
| USBx | Selected device |
| HAL | status |
Definition at line 1158 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
De-activate and de-initialize a dedicated endpoint.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 604 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DeactivateEndpoint | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
De-activate and de-initialize an endpoint.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 569 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DeactivateEndpoint | ( | USB_TypeDef * | USBx, |
| USB_EPTypeDef * | ep | ||
| ) |
De-activate and de-initialize an endpoint.
| USBx | : Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 2091 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DeActivateRemoteWakeup | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_DeActivateRemoteWakeup de-active remote wakeup signalling.
| USBx | Selected device |
| HAL | status |
Definition at line 1778 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DeActivateRemoteWakeup | ( | USB_TypeDef * | USBx | ) |
USB_DeActivateRemoteWakeup : de-active remote wakeup signalling.
| USBx | Selected device |
| HAL | status |
Definition at line 2517 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevConnect | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_DevConnect : Connect the USB device by enabling the pull-up/pull-down.
| USBx | Selected device |
| HAL | status |
Definition at line 970 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevConnect | ( | USB_TypeDef * | USBx | ) |
USB_DevConnect : Connect the USB device by enabling the pull-up/pull-down.
| USBx | : Selected device |
| HAL | status |
Definition at line 2361 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevDisconnect | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_DevDisconnect : Disconnect the USB device by disabling the pull-up/pull-down.
| USBx | Selected device |
| HAL | status |
Definition at line 985 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevDisconnect | ( | USB_TypeDef * | USBx | ) |
USB_DevDisconnect : Disconnect the USB device by disabling the pull-up/pull-down.
| USBx | : Selected device |
| HAL | status |
Definition at line 2374 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevInit | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_CfgTypeDef | cfg | ||
| ) |
USB_DevInit : Initializes the USB_OTG controller registers for device mode.
| USBx | Selected device |
| cfg | pointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral. |
| HAL | status |
Definition at line 268 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DevInit | ( | USB_TypeDef * | USBx, |
| USB_CfgTypeDef | cfg | ||
| ) |
USB_DevInit : Initializes the USB controller registers for device mode.
| USBx | : Selected device |
| cfg | : pointer to a USB_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral. |
| HAL | status |
Definition at line 1884 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DisableGlobalInt | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_DisableGlobalInt Disable the controller's Global Int in the AHB Config reg.
| USBx | Selected device |
| HAL | status |
Definition at line 223 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DisableGlobalInt | ( | USB_TypeDef * | USBx | ) |
USB_DisableGlobalInt Disable the controller's Global Int in the AHB Config reg.
| USBx | : Selected device |
| HAL | status |
Definition at line 1839 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DoPing | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | ch_num | ||
| ) |
Initiate Do Ping protocol.
| USBx | Selected device |
| hc_num | Host Channel number This parameter can be a value from 1 to 15 |
| HAL | state |
Definition at line 1680 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_DriveVbus | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | state | ||
| ) |
USB_DriveVbus : activate or de-activate vbus.
| state | VBUS state This parameter can be one of these values: 0 : VBUS Active 1 : VBUS Inactive |
| HAL | status |
Definition at line 1317 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EnableGlobalInt | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg.
| USBx | Selected device |
| HAL | status |
Definition at line 211 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EnableGlobalInt | ( | USB_TypeDef * | USBx | ) |
USB_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg.
| USBx | : Selected device |
| HAL | status |
Definition at line 1817 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EP0_OutStart | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t * | psetup | ||
| ) |
Prepare the EP0 to start the first control setup.
| USBx | Selected device |
| psetup | pointer to setup packet |
| HAL | status |
Definition at line 1131 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EP0_OutStart | ( | USB_TypeDef * | USBx, |
| uint8_t * | psetup | ||
| ) |
Prepare the EP0 to start the first control setup.
| USBx | Selected device |
| psetup | pointer to setup packet |
| HAL | status |
Definition at line 2488 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EP0StartXfer | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
USB_EP0StartXfer : setup and starts a transfer over the EP 0.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 734 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPClearStall | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
USB_EPClearStall : Clear a stall condition over an EP.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 885 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPClearStall | ( | USB_TypeDef * | USBx, |
| USB_EPTypeDef * | ep | ||
| ) |
USB_EPClearStall : Clear a stall condition over an EP.
| USBx | : Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 2293 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPSetStall | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
USB_EPSetStall : set a stall condition over an EP.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 854 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPSetStall | ( | USB_TypeDef * | USBx, |
| USB_EPTypeDef * | ep | ||
| ) |
USB_EPSetStall : set a stall condition over an EP.
| USBx | : Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 2273 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPStartXfer | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_EPTypeDef * | ep | ||
| ) |
USB_EPStartXfer : setup and starts a transfer over an EP.
| USBx | Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 630 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_EPStartXfer | ( | USB_TypeDef * | USBx, |
| USB_EPTypeDef * | ep | ||
| ) |
USB_EPStartXfer : setup and starts a transfer over an EP.
| USBx | : Selected device |
| ep | pointer to endpoint structure |
| HAL | status |
Definition at line 2144 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_FlushRxFifo | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_FlushRxFifo : Flush Rx FIFO.
| USBx | Selected device |
| HAL | status |
Definition at line 425 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_FlushRxFifo | ( | USB_TypeDef * | USBx | ) |
USB_FlushRxFifo : Flush Rx FIFO.
| USBx | : Selected device |
| HAL | status |
Definition at line 1956 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_FlushTxFifo | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint32_t | num | ||
| ) |
USB_OTG_FlushTxFifo : Flush a Tx FIFO.
| USBx | Selected device |
| num | FIFO number This parameter can be a value from 1 to 15 15 means Flush all Tx FIFOs |
| HAL | status |
Definition at line 402 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_FlushTxFifo | ( | USB_TypeDef * | USBx, |
| uint32_t | num | ||
| ) |
USB_FlushTxFifo : Flush a Tx FIFO.
| USBx | : Selected device |
| num | : FIFO number This parameter can be a value from 1 to 15 15 means Flush all Tx FIFOs |
| HAL | status |
Definition at line 1937 of file stm32l4xx_ll_usb.c.
| uint32_t USB_GetCurrentFrame | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Return Host Current Frame number.
| USBx | Selected device |
| current | frame number |
Definition at line 1360 of file stm32l4xx_ll_usb.c.
| uint8_t USB_GetDevSpeed | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_GetDevSpeed Return the Dev Speed.
| USBx | Selected device |
| speed | device speed This parameter can be one of these values:
|
Definition at line 467 of file stm32l4xx_ll_usb.c.
| uint32_t USB_GetHostSpeed | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Return Host Core speed.
| USBx | Selected device |
| speed | : Host speed This parameter can be one of these values:
|
Definition at line 1346 of file stm32l4xx_ll_usb.c.
| uint32_t USB_GetMode | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Returns USB core mode.
| USBx | Selected device |
| return | core mode : Host or Device This parameter can be one of these values: 0 : Host 1 : Device |
Definition at line 1099 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_HC_Halt | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | hc_num | ||
| ) |
Halt a host channel.
| USBx | Selected device |
| hc_num | Host Channel number This parameter can be a value from 1 to 15 |
| HAL | state |
Definition at line 1615 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_HC_Init | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | ch_num, | ||
| uint8_t | epnum, | ||
| uint8_t | dev_address, | ||
| uint8_t | speed, | ||
| uint8_t | ep_type, | ||
| uint16_t | mps | ||
| ) |
Initialize a host channel.
| USBx | Selected device |
| ch_num | Channel number This parameter can be a value from 1 to 15 |
| epnum | Endpoint number This parameter can be a value from 1 to 15 |
| dev_address | Current device address This parameter can be a value from 0 to 255 |
| speed | Current device speed This parameter can be one of these values:
|
| ep_type | Endpoint Type This parameter can be one of these values:
|
| mps | Max Packet Size This parameter can be a value from 0 to32K |
| HAL | state |
Definition at line 1390 of file stm32l4xx_ll_usb.c.
| uint32_t USB_HC_ReadInterrupt | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Read all host channel interrupts status.
| USBx | Selected device |
| HAL | state |
Definition at line 1601 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_HC_StartXfer | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_HCTypeDef * | hc | ||
| ) |
Start a transfer over a host channel.
| USBx | Selected device |
| hc | pointer to host channel structure |
| HAL | state |
Definition at line 1500 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_HostInit | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_OTG_CfgTypeDef | cfg | ||
| ) |
USB_HostInit : Initializes the USB OTG controller registers for Host mode.
| USBx | Selected device |
| cfg | pointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral. |
| HAL | status |
Definition at line 1196 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_InitFSLSPClkSel | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | freq | ||
| ) |
USB_InitFSLSPClkSel : Initializes the FSLSPClkSel field of the HCFG register on the PHY type and set the right frame interval.
| USBx | Selected device |
| freq | clock frequency This parameter can be one of these values: HCFG_48_MHZ : Full Speed 48 MHz Clock HCFG_6_MHZ : Low Speed 6 MHz Clock |
| HAL | status |
Definition at line 1260 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevAllInEpInterrupt | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status.
| USBx | Selected device |
| HAL | status |
Definition at line 1031 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevAllInEpInterrupt | ( | USB_TypeDef * | USBx | ) |
USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status.
| USBx | : Selected device |
| HAL | status |
Definition at line 2416 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevAllOutEpInterrupt | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status.
| USBx | Selected device |
| HAL | status |
Definition at line 1015 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevAllOutEpInterrupt | ( | USB_TypeDef * | USBx | ) |
USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status.
| USBx | : Selected device |
| HAL | status |
Definition at line 2400 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevInEPInterrupt | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | epnum | ||
| ) |
Returns Device IN EP Interrupt register.
| USBx | Selected device |
| epnum | endpoint number This parameter can be a value from 0 to 15 |
| Device | IN EP Interrupt register |
Definition at line 1067 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevInEPInterrupt | ( | USB_TypeDef * | USBx, |
| uint8_t | epnum | ||
| ) |
Returns Device IN EP Interrupt register.
| USBx | : Selected device |
| epnum | : endpoint number This parameter can be a value from 0 to 15 |
| Device | IN EP Interrupt register |
Definition at line 2453 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevOutEPInterrupt | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | epnum | ||
| ) |
Returns Device OUT EP Interrupt register.
| USBx | Selected device |
| epnum | endpoint number This parameter can be a value from 0 to 15 |
| Device | OUT EP Interrupt register |
Definition at line 1049 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadDevOutEPInterrupt | ( | USB_TypeDef * | USBx, |
| uint8_t | epnum | ||
| ) |
Returns Device OUT EP Interrupt register.
| USBx | : Selected device |
| epnum | : endpoint number This parameter can be a value from 0 to 15 |
| Device | OUT EP Interrupt register |
Definition at line 2434 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadInterrupts | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_ReadInterrupts: return the global USB interrupt status.
| USBx | Selected device |
| HAL | status |
Definition at line 1000 of file stm32l4xx_ll_usb.c.
| uint32_t USB_ReadInterrupts | ( | USB_TypeDef * | USBx | ) |
USB_ReadInterrupts: return the global USB interrupt status.
| USBx | : Selected device |
| HAL | status |
Definition at line 2387 of file stm32l4xx_ll_usb.c.
| void* USB_ReadPacket | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t * | dest, | ||
| uint16_t | len | ||
| ) |
USB_ReadPacket : read a packet from the RX FIFO.
| USBx | Selected device |
| dest | source pointer |
| len | Number of bytes to read |
| pointer | to destination buffer |
Definition at line 832 of file stm32l4xx_ll_usb.c.
| void* USB_ReadPacket | ( | USB_TypeDef * | USBx, |
| uint8_t * | dest, | ||
| uint16_t | len | ||
| ) |
USB_ReadPacket : read a packet from the Tx FIFO associated with the EP/channel.
| USBx | : Selected device |
| dest | : destination pointer |
| len | : Number of bytes to read |
| pointer | to destination buffer |
Definition at line 2254 of file stm32l4xx_ll_usb.c.
| void USB_ReadPMA | ( | USB_TypeDef * | USBx, |
| uint8_t * | pbUsrBuf, | ||
| uint16_t | wPMABufAddr, | ||
| uint16_t | wNBytes | ||
| ) |
Copy a buffer from user memory area to packet memory area (PMA)
| USBx | USB peripheral instance register address. |
| pbUsrBuf | pointer to user memory area. |
| wPMABufAddr | address into PMA. |
| wNBytes | no. of bytes to be copied. |
| None |
Definition at line 2565 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_ResetPort | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_OTG_ResetPort : Reset Host Port.
| USBx | Selected device |
| HAL | status |
Definition at line 1290 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetCurrentMode | ( | USB_OTG_GlobalTypeDef * | USBx, |
| USB_ModeTypeDef | mode | ||
| ) |
USB_SetCurrentMode : Set functional mode.
| USBx | Selected device |
| mode | current core mode This parameter can be one of these values:
|
| HAL | status |
Definition at line 239 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetCurrentMode | ( | USB_TypeDef * | USBx, |
| USB_ModeTypeDef | mode | ||
| ) |
USB_SetCurrentMode : Set functional mode.
| USBx | : Selected device |
| mode | : current core mode This parameter can be one of the these values:
|
| HAL | status |
Definition at line 1863 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetDevAddress | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | address | ||
| ) |
USB_SetDevAddress : Stop the usb device mode.
| USBx | Selected device |
| address | new device address to be assigned This parameter can be a value from 0 to 255 |
| HAL | status |
Definition at line 955 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetDevAddress | ( | USB_TypeDef * | USBx, |
| uint8_t | address | ||
| ) |
USB_SetDevAddress : Stop the usb device mode.
| USBx | : Selected device |
| address | : new device address to be assigned This parameter can be a value from 0 to 255 |
| HAL | status |
Definition at line 2345 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetDevSpeed | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t | speed | ||
| ) |
USB_SetDevSpeed Initializes the DevSpd field of DCFG register depending the PHY type and the enumeration speed of the device.
| USBx | Selected device |
| speed | device speed This parameter can be one of these values:
|
| Hal | status |
Definition at line 452 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetDevSpeed | ( | USB_TypeDef * | USBx, |
| uint8_t | speed | ||
| ) |
USB_SetDevSpeed :Initializes the device speed depending on the PHY type and the enumeration speed of the device.
| USBx | Selected device |
| speed | device speed |
| Hal | status |
Definition at line 1915 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_SetTurnaroundTime | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint32_t | hclk, | ||
| uint8_t | speed | ||
| ) |
Set the USB turnaround time.
| USBx | USB Instance |
| hclk | AHB clock frequency |
| USB | turnaround time In PHY Clocks number |
Definition at line 132 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_StopDevice | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
USB_StopDevice : Stop the usb device mode.
| USBx | Selected device |
| HAL | status |
Definition at line 914 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_StopDevice | ( | USB_TypeDef * | USBx | ) |
USB_StopDevice : Stop the usb device mode.
| USBx | : Selected device |
| HAL | status |
Definition at line 2324 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_StopHost | ( | USB_OTG_GlobalTypeDef * | USBx | ) |
Stop Host Core.
| USBx | Selected device |
| HAL | state |
Definition at line 1704 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_WritePacket | ( | USB_OTG_GlobalTypeDef * | USBx, |
| uint8_t * | src, | ||
| uint8_t | ch_ep_num, | ||
| uint16_t | len | ||
| ) |
USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel.
| USBx | Selected device |
| src | pointer to source buffer |
| ch_ep_num | endpoint or host channel number |
| len | Number of bytes to write |
| HAL | status |
Definition at line 809 of file stm32l4xx_ll_usb.c.
| HAL_StatusTypeDef USB_WritePacket | ( | USB_TypeDef * | USBx, |
| uint8_t * | src, | ||
| uint8_t | ch_ep_num, | ||
| uint16_t | len | ||
| ) |
USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel.
| USBx | : Selected device |
| src | : pointer to source buffer |
| ch_ep_num | : endpoint or host channel number |
| len | : Number of bytes to write |
| HAL | status |
Definition at line 2232 of file stm32l4xx_ll_usb.c.
| void USB_WritePMA | ( | USB_TypeDef * | USBx, |
| uint8_t * | pbUsrBuf, | ||
| uint16_t | wPMABufAddr, | ||
| uint16_t | wNBytes | ||
| ) |
Copy a buffer from user memory area to packet memory area (PMA)
| USBx | USB peripheral instance register address. |
| pbUsrBuf | pointer to user memory area. |
| wPMABufAddr | address into PMA. |
| wNBytes | no. of bytes to be copied. |
| None |
Definition at line 2531 of file stm32l4xx_ll_usb.c.