STM32F4xx_HAL_Driver  1.8.3
USB Low Layer Exported Functions
+ Collaboration diagram for USB Low Layer Exported Functions:

Modules

 Initialization/de-initialization functions
 Initialization and Configuration functions.
 

Functions

HAL_StatusTypeDef USB_CoreInit (USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg)
 Initializes the USB Core. 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_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_SetTurnaroundTime (USB_OTG_GlobalTypeDef *USBx, uint32_t hclk, uint8_t speed)
 Set the USB turnaround time. More...
 
HAL_StatusTypeDef USB_SetCurrentMode (USB_OTG_GlobalTypeDef *USBx, USB_OTG_ModeTypeDef mode)
 USB_SetCurrentMode Set functional mode. More...
 
HAL_StatusTypeDef USB_SetDevSpeed (const 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...
 
HAL_StatusTypeDef USB_FlushRxFifo (USB_OTG_GlobalTypeDef *USBx)
 USB_FlushRxFifo Flush Rx FIFO. More...
 
HAL_StatusTypeDef USB_FlushTxFifo (USB_OTG_GlobalTypeDef *USBx, uint32_t num)
 USB_FlushTxFifo Flush a Tx FIFO. More...
 
HAL_StatusTypeDef USB_ActivateEndpoint (const USB_OTG_GlobalTypeDef *USBx, const USB_OTG_EPTypeDef *ep)
 Activate and configure an endpoint. More...
 
HAL_StatusTypeDef USB_DeactivateEndpoint (const USB_OTG_GlobalTypeDef *USBx, const USB_OTG_EPTypeDef *ep)
 De-activate and de-initialize an endpoint. More...
 
HAL_StatusTypeDef USB_ActivateDedicatedEndpoint (const USB_OTG_GlobalTypeDef *USBx, const USB_OTG_EPTypeDef *ep)
 Activate and configure a dedicated endpoint. More...
 
HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint (const USB_OTG_GlobalTypeDef *USBx, const 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, uint8_t dma)
 USB_EPStartXfer : setup and starts a transfer over an EP. More...
 
HAL_StatusTypeDef USB_WritePacket (const USB_OTG_GlobalTypeDef *USBx, uint8_t *src, uint8_t ch_ep_num, uint16_t len, uint8_t dma)
 USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel. More...
 
void * USB_ReadPacket (const USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len)
 USB_ReadPacket : read a packet from the RX FIFO. More...
 
HAL_StatusTypeDef USB_EPSetStall (const USB_OTG_GlobalTypeDef *USBx, const USB_OTG_EPTypeDef *ep)
 USB_EPSetStall : set a stall condition over an EP. More...
 
HAL_StatusTypeDef USB_EPClearStall (const USB_OTG_GlobalTypeDef *USBx, const USB_OTG_EPTypeDef *ep)
 USB_EPClearStall : Clear a stall condition over an EP. More...
 
HAL_StatusTypeDef USB_EPStopXfer (const USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep)
 USB_EPStoptXfer Stop transfer on an EP. More...
 
HAL_StatusTypeDef USB_SetDevAddress (const USB_OTG_GlobalTypeDef *USBx, uint8_t address)
 USB_SetDevAddress : Stop the usb device mode. More...
 
HAL_StatusTypeDef USB_DevConnect (const USB_OTG_GlobalTypeDef *USBx)
 USB_DevConnect : Connect the USB device by enabling Rpu. More...
 
HAL_StatusTypeDef USB_DevDisconnect (const USB_OTG_GlobalTypeDef *USBx)
 USB_DevDisconnect : Disconnect the USB device by disabling Rpu. More...
 
HAL_StatusTypeDef USB_StopDevice (USB_OTG_GlobalTypeDef *USBx)
 USB_StopDevice : Stop the usb device mode. More...
 
HAL_StatusTypeDef USB_ActivateSetup (const USB_OTG_GlobalTypeDef *USBx)
 Activate EP0 for Setup transactions. More...
 
HAL_StatusTypeDef USB_EP0_OutStart (const USB_OTG_GlobalTypeDef *USBx, uint8_t dma, const uint8_t *psetup)
 Prepare the EP0 to start the first control setup. More...
 
uint8_t USB_GetDevSpeed (const USB_OTG_GlobalTypeDef *USBx)
 USB_GetDevSpeed Return the Dev Speed. More...
 
uint32_t USB_GetMode (const USB_OTG_GlobalTypeDef *USBx)
 Returns USB core mode. More...
 
uint32_t USB_ReadInterrupts (USB_OTG_GlobalTypeDef const *USBx)
 USB_ReadInterrupts: return the global USB interrupt status. More...
 
uint32_t USB_ReadChInterrupts (const USB_OTG_GlobalTypeDef *USBx, uint8_t chnum)
 USB_ReadChInterrupts: return USB channel interrupt status. More...
 
uint32_t USB_ReadDevAllOutEpInterrupt (const USB_OTG_GlobalTypeDef *USBx)
 USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status. More...
 
uint32_t USB_ReadDevOutEPInterrupt (const USB_OTG_GlobalTypeDef *USBx, uint8_t epnum)
 Returns Device OUT EP Interrupt register. More...
 
uint32_t USB_ReadDevAllInEpInterrupt (const USB_OTG_GlobalTypeDef *USBx)
 USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status. More...
 
uint32_t USB_ReadDevInEPInterrupt (const 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...
 
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 (const 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 (const USB_OTG_GlobalTypeDef *USBx)
 USB_OTG_ResetPort : Reset Host Port. More...
 
HAL_StatusTypeDef USB_DriveVbus (const USB_OTG_GlobalTypeDef *USBx, uint8_t state)
 USB_DriveVbus : activate or de-activate vbus. More...
 
uint32_t USB_GetHostSpeed (USB_OTG_GlobalTypeDef const *USBx)
 Return Host Core speed. More...
 
uint32_t USB_GetCurrentFrame (USB_OTG_GlobalTypeDef const *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, uint8_t dma)
 Start a transfer over a host channel. More...
 
uint32_t USB_HC_ReadInterrupt (const USB_OTG_GlobalTypeDef *USBx)
 Read all host channel interrupts status. More...
 
HAL_StatusTypeDef USB_HC_Halt (const USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num)
 Halt a host channel. More...
 
HAL_StatusTypeDef USB_DoPing (const 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 (const USB_OTG_GlobalTypeDef *USBx)
 USB_ActivateRemoteWakeup active remote wakeup signalling. More...
 
HAL_StatusTypeDef USB_DeActivateRemoteWakeup (const USB_OTG_GlobalTypeDef *USBx)
 USB_DeActivateRemoteWakeup de-active remote wakeup signalling. More...
 

Detailed Description

Function Documentation

◆ USB_ActivateDedicatedEndpoint()

HAL_StatusTypeDef USB_ActivateDedicatedEndpoint ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

Activate and configure a dedicated endpoint.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 636 of file stm32f4xx_ll_usb.c.

◆ USB_ActivateEndpoint()

HAL_StatusTypeDef USB_ActivateEndpoint ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

Activate and configure an endpoint.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 598 of file stm32f4xx_ll_usb.c.

◆ USB_ActivateRemoteWakeup()

HAL_StatusTypeDef USB_ActivateRemoteWakeup ( const USB_OTG_GlobalTypeDef *  USBx)

USB_ActivateRemoteWakeup active remote wakeup signalling.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 2275 of file stm32f4xx_ll_usb.c.

◆ USB_ActivateSetup()

HAL_StatusTypeDef USB_ActivateSetup ( const USB_OTG_GlobalTypeDef *  USBx)

Activate EP0 for Setup transactions.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 1351 of file stm32f4xx_ll_usb.c.

◆ USB_ClearInterrupts()

void USB_ClearInterrupts ( USB_OTG_GlobalTypeDef *  USBx,
uint32_t  interrupt 
)

USB_ClearInterrupts: clear a USB interrupt.

Parameters
USBxSelected device
interruptflag
Return values
None

Definition at line 1328 of file stm32f4xx_ll_usb.c.

◆ USB_CoreInit()

HAL_StatusTypeDef USB_CoreInit ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_CfgTypeDef  cfg 
)

Initializes the USB Core.

Parameters
USBxUSB Instance
cfgpointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral.
Return values
HALstatus

Definition at line 83 of file stm32f4xx_ll_usb.c.

◆ USB_DeactivateDedicatedEndpoint()

HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

De-activate and de-initialize a dedicated endpoint.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 722 of file stm32f4xx_ll_usb.c.

◆ USB_DeactivateEndpoint()

HAL_StatusTypeDef USB_DeactivateEndpoint ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

De-activate and de-initialize an endpoint.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 675 of file stm32f4xx_ll_usb.c.

◆ USB_DeActivateRemoteWakeup()

HAL_StatusTypeDef USB_DeActivateRemoteWakeup ( const USB_OTG_GlobalTypeDef *  USBx)

USB_DeActivateRemoteWakeup de-active remote wakeup signalling.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 2293 of file stm32f4xx_ll_usb.c.

◆ USB_DevConnect()

HAL_StatusTypeDef USB_DevConnect ( const USB_OTG_GlobalTypeDef *  USBx)

USB_DevConnect : Connect the USB device by enabling Rpu.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 1189 of file stm32f4xx_ll_usb.c.

◆ USB_DevDisconnect()

HAL_StatusTypeDef USB_DevDisconnect ( const USB_OTG_GlobalTypeDef *  USBx)

USB_DevDisconnect : Disconnect the USB device by disabling Rpu.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 1206 of file stm32f4xx_ll_usb.c.

◆ USB_DevInit()

HAL_StatusTypeDef USB_DevInit ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_CfgTypeDef  cfg 
)

USB_DevInit Initializes the USB_OTG controller registers for device mode.

Parameters
USBxSelected device
cfgpointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral.
Return values
HALstatus

Definition at line 296 of file stm32f4xx_ll_usb.c.

◆ USB_DisableGlobalInt()

HAL_StatusTypeDef USB_DisableGlobalInt ( USB_OTG_GlobalTypeDef *  USBx)

USB_DisableGlobalInt Disable the controller's Global Int in the AHB Config reg.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 234 of file stm32f4xx_ll_usb.c.

◆ USB_DoPing()

HAL_StatusTypeDef USB_DoPing ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  ch_num 
)

Initiate Do Ping protocol.

Parameters
USBxSelected device
hc_numHost Channel number This parameter can be a value from 1 to 15
Return values
HALstate

Definition at line 2186 of file stm32f4xx_ll_usb.c.

◆ USB_DriveVbus()

HAL_StatusTypeDef USB_DriveVbus ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  state 
)

USB_DriveVbus : activate or de-activate vbus.

Parameters
stateVBUS state This parameter can be one of these values: 0 : Deactivate VBUS 1 : Activate VBUS
Return values
HALstatus

Definition at line 1618 of file stm32f4xx_ll_usb.c.

◆ USB_EnableGlobalInt()

HAL_StatusTypeDef USB_EnableGlobalInt ( USB_OTG_GlobalTypeDef *  USBx)

USB_EnableGlobalInt Enables the controller's Global Int in the AHB Config reg.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 222 of file stm32f4xx_ll_usb.c.

◆ USB_EP0_OutStart()

HAL_StatusTypeDef USB_EP0_OutStart ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  dma,
const uint8_t *  psetup 
)

Prepare the EP0 to start the first control setup.

Parameters
USBxSelected device
dmaUSB dma enabled or disabled This parameter can be one of these values: 0 : DMA feature not used 1 : DMA feature used
psetuppointer to setup packet
Return values
HALstatus

Definition at line 1373 of file stm32f4xx_ll_usb.c.

◆ USB_EPClearStall()

HAL_StatusTypeDef USB_EPClearStall ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

USB_EPClearStall : Clear a stall condition over an EP.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 1104 of file stm32f4xx_ll_usb.c.

◆ USB_EPSetStall()

HAL_StatusTypeDef USB_EPSetStall ( const USB_OTG_GlobalTypeDef *  USBx,
const USB_OTG_EPTypeDef ep 
)

USB_EPSetStall : set a stall condition over an EP.

Parameters
USBxSelected device
eppointer to endpoint structure
Return values
HALstatus

Definition at line 1073 of file stm32f4xx_ll_usb.c.

◆ USB_EPStartXfer()

HAL_StatusTypeDef USB_EPStartXfer ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_EPTypeDef ep,
uint8_t  dma 
)

USB_EPStartXfer : setup and starts a transfer over an EP.

Parameters
USBxSelected device
eppointer to endpoint structure
dmaUSB dma enabled or disabled This parameter can be one of these values: 0 : DMA feature not used 1 : DMA feature used
Return values
HALstatus

Definition at line 764 of file stm32f4xx_ll_usb.c.

◆ USB_EPStopXfer()

HAL_StatusTypeDef USB_EPStopXfer ( const USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_EPTypeDef ep 
)

USB_EPStoptXfer Stop transfer on an EP.

Parameters
USBxusb device instance
eppointer to endpoint structure
Return values
HALstatus

Definition at line 936 of file stm32f4xx_ll_usb.c.

◆ USB_FlushRxFifo()

HAL_StatusTypeDef USB_FlushRxFifo ( USB_OTG_GlobalTypeDef *  USBx)

USB_FlushRxFifo Flush Rx FIFO.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 510 of file stm32f4xx_ll_usb.c.

◆ USB_FlushTxFifo()

HAL_StatusTypeDef USB_FlushTxFifo ( USB_OTG_GlobalTypeDef *  USBx,
uint32_t  num 
)

USB_FlushTxFifo Flush a Tx FIFO.

Parameters
USBxSelected device
numFIFO number This parameter can be a value from 1 to 15 15 means Flush all Tx FIFOs
Return values
HALstatus

Definition at line 473 of file stm32f4xx_ll_usb.c.

◆ USB_GetCurrentFrame()

uint32_t USB_GetCurrentFrame ( USB_OTG_GlobalTypeDef const *  USBx)

Return Host Current Frame number.

Parameters
USBxSelected device
Return values
currentframe number

Definition at line 1662 of file stm32f4xx_ll_usb.c.

◆ USB_GetDevSpeed()

uint8_t USB_GetDevSpeed ( const USB_OTG_GlobalTypeDef *  USBx)

USB_GetDevSpeed Return the Dev Speed.

Parameters
USBxSelected device
Return values
speeddevice speed This parameter can be one of these values:
  • USBD_HS_SPEED: High speed mode
  • USBD_FS_SPEED: Full speed mode

Definition at line 569 of file stm32f4xx_ll_usb.c.

◆ USB_GetHostSpeed()

uint32_t USB_GetHostSpeed ( USB_OTG_GlobalTypeDef const *  USBx)

Return Host Core speed.

Parameters
USBxSelected device
Return values
speed: Host speed This parameter can be one of these values:
  • HCD_SPEED_HIGH: High speed mode
  • HCD_SPEED_FULL: Full speed mode
  • HCD_SPEED_LOW: Low speed mode

Definition at line 1648 of file stm32f4xx_ll_usb.c.

◆ USB_GetMode()

uint32_t USB_GetMode ( const USB_OTG_GlobalTypeDef *  USBx)

Returns USB core mode.

Parameters
USBxSelected device
Return values
returncore mode : Host or Device This parameter can be one of these values: 0 : Host 1 : Device

Definition at line 1341 of file stm32f4xx_ll_usb.c.

◆ USB_HC_Halt()

HAL_StatusTypeDef USB_HC_Halt ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  hc_num 
)

Halt a host channel.

Parameters
USBxSelected device
hc_numHost Channel number This parameter can be a value from 1 to 15
Return values
HALstate

Definition at line 2102 of file stm32f4xx_ll_usb.c.

◆ USB_HC_Init()

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.

Parameters
USBxSelected device
ch_numChannel number This parameter can be a value from 1 to 15
epnumEndpoint number This parameter can be a value from 1 to 15
dev_addressCurrent device address This parameter can be a value from 0 to 255
speedCurrent device speed This parameter can be one of these values:
  • USB_OTG_SPEED_HIGH: High speed mode
  • USB_OTG_SPEED_FULL: Full speed mode
  • USB_OTG_SPEED_LOW: Low speed mode
ep_typeEndpoint Type This parameter can be one of these values:
  • EP_TYPE_CTRL: Control type
  • EP_TYPE_ISOC: Isochronous type
  • EP_TYPE_BULK: Bulk type
  • EP_TYPE_INTR: Interrupt type
mpsMax Packet Size This parameter can be a value from 0 to 32K
Return values
HALstate

Definition at line 1693 of file stm32f4xx_ll_usb.c.

◆ USB_HC_ReadInterrupt()

uint32_t USB_HC_ReadInterrupt ( const USB_OTG_GlobalTypeDef *  USBx)

Read all host channel interrupts status.

Parameters
USBxSelected device
Return values
HALstate

Definition at line 2088 of file stm32f4xx_ll_usb.c.

◆ USB_HC_StartXfer()

HAL_StatusTypeDef USB_HC_StartXfer ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_HCTypeDef hc,
uint8_t  dma 
)

Start a transfer over a host channel.

Parameters
USBxSelected device
hcpointer to host channel structure
dmaUSB dma enabled or disabled This parameter can be one of these values: 0 : DMA feature not used 1 : DMA feature used
Return values
HALstate

Definition at line 1825 of file stm32f4xx_ll_usb.c.

◆ USB_HostInit()

HAL_StatusTypeDef USB_HostInit ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_CfgTypeDef  cfg 
)

USB_HostInit : Initializes the USB OTG controller registers for Host mode.

Parameters
USBxSelected device
cfgpointer to a USB_OTG_CfgTypeDef structure that contains the configuration information for the specified USBx peripheral.
Return values
HALstatus

Definition at line 1446 of file stm32f4xx_ll_usb.c.

◆ USB_InitFSLSPClkSel()

HAL_StatusTypeDef USB_InitFSLSPClkSel ( const 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.

Parameters
USBxSelected device
freqclock 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
Return values
HALstatus

Definition at line 1561 of file stm32f4xx_ll_usb.c.

◆ USB_ReadChInterrupts()

uint32_t USB_ReadChInterrupts ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  chnum 
)

USB_ReadChInterrupts: return USB channel interrupt status.

Parameters
USBxSelected device
chnumChannel number
Return values
USBChannel Interrupt status

Definition at line 1239 of file stm32f4xx_ll_usb.c.

◆ USB_ReadDevAllInEpInterrupt()

uint32_t USB_ReadDevAllInEpInterrupt ( const USB_OTG_GlobalTypeDef *  USBx)

USB_ReadDevAllInEpInterrupt: return the USB device IN endpoints interrupt status.

Parameters
USBxSelected device
Return values
USBDevice IN EP interrupt status

Definition at line 1271 of file stm32f4xx_ll_usb.c.

◆ USB_ReadDevAllOutEpInterrupt()

uint32_t USB_ReadDevAllOutEpInterrupt ( const USB_OTG_GlobalTypeDef *  USBx)

USB_ReadDevAllOutEpInterrupt: return the USB device OUT endpoints interrupt status.

Parameters
USBxSelected device
Return values
USBDevice OUT EP interrupt status

Definition at line 1255 of file stm32f4xx_ll_usb.c.

◆ USB_ReadDevInEPInterrupt()

uint32_t USB_ReadDevInEPInterrupt ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  epnum 
)

Returns Device IN EP Interrupt register.

Parameters
USBxSelected device
epnumendpoint number This parameter can be a value from 0 to 15
Return values
DeviceIN EP Interrupt register

Definition at line 1307 of file stm32f4xx_ll_usb.c.

◆ USB_ReadDevOutEPInterrupt()

uint32_t USB_ReadDevOutEPInterrupt ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  epnum 
)

Returns Device OUT EP Interrupt register.

Parameters
USBxSelected device
epnumendpoint number This parameter can be a value from 0 to 15
Return values
DeviceOUT EP Interrupt register

Definition at line 1289 of file stm32f4xx_ll_usb.c.

◆ USB_ReadInterrupts()

uint32_t USB_ReadInterrupts ( USB_OTG_GlobalTypeDef const *  USBx)

USB_ReadInterrupts: return the global USB interrupt status.

Parameters
USBxSelected device
Return values
USBGlobal Interrupt status

Definition at line 1223 of file stm32f4xx_ll_usb.c.

◆ USB_ReadPacket()

void* USB_ReadPacket ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t *  dest,
uint16_t  len 
)

USB_ReadPacket : read a packet from the RX FIFO.

Parameters
USBxSelected device
destsource pointer
lenNumber of bytes to read
Return values
pointerto destination buffer

Definition at line 1031 of file stm32f4xx_ll_usb.c.

◆ USB_ResetPort()

HAL_StatusTypeDef USB_ResetPort ( const USB_OTG_GlobalTypeDef *  USBx)

USB_OTG_ResetPort : Reset Host Port.

Parameters
USBxSelected device
Return values
HALstatus
Note
(1)The application must wait at least 10 ms before clearing the reset bit.

Definition at line 1591 of file stm32f4xx_ll_usb.c.

◆ USB_SetCurrentMode()

HAL_StatusTypeDef USB_SetCurrentMode ( USB_OTG_GlobalTypeDef *  USBx,
USB_OTG_ModeTypeDef  mode 
)

USB_SetCurrentMode Set functional mode.

Parameters
USBxSelected device
modecurrent core mode This parameter can be one of these values:
  • USB_DEVICE_MODE Peripheral mode
  • USB_HOST_MODE Host mode
Return values
HALstatus

Definition at line 249 of file stm32f4xx_ll_usb.c.

◆ USB_SetDevAddress()

HAL_StatusTypeDef USB_SetDevAddress ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t  address 
)

USB_SetDevAddress : Stop the usb device mode.

Parameters
USBxSelected device
addressnew device address to be assigned This parameter can be a value from 0 to 255
Return values
HALstatus

Definition at line 1174 of file stm32f4xx_ll_usb.c.

◆ USB_SetDevSpeed()

HAL_StatusTypeDef USB_SetDevSpeed ( const 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.

Parameters
USBxSelected device
speeddevice speed This parameter can be one of these values:
  • USB_OTG_SPEED_HIGH: High speed mode
  • USB_OTG_SPEED_HIGH_IN_FULL: High speed core in Full Speed mode
  • USB_OTG_SPEED_FULL: Full speed mode
Return values
Halstatus

Definition at line 553 of file stm32f4xx_ll_usb.c.

◆ USB_SetTurnaroundTime()

HAL_StatusTypeDef USB_SetTurnaroundTime ( USB_OTG_GlobalTypeDef *  USBx,
uint32_t  hclk,
uint8_t  speed 
)

Set the USB turnaround time.

Parameters
USBxUSB Instance
hclkAHB clock frequency
Return values
USBturnaround time In PHY Clocks number

Definition at line 139 of file stm32f4xx_ll_usb.c.

◆ USB_StopDevice()

HAL_StatusTypeDef USB_StopDevice ( USB_OTG_GlobalTypeDef *  USBx)

USB_StopDevice : Stop the usb device mode.

Parameters
USBxSelected device
Return values
HALstatus

Definition at line 1133 of file stm32f4xx_ll_usb.c.

◆ USB_StopHost()

HAL_StatusTypeDef USB_StopHost ( USB_OTG_GlobalTypeDef *  USBx)

Stop Host Core.

Parameters
USBxSelected device
Return values
HALstate

Definition at line 2210 of file stm32f4xx_ll_usb.c.

◆ USB_WritePacket()

HAL_StatusTypeDef USB_WritePacket ( const USB_OTG_GlobalTypeDef *  USBx,
uint8_t *  src,
uint8_t  ch_ep_num,
uint16_t  len,
uint8_t  dma 
)

USB_WritePacket : Writes a packet into the Tx FIFO associated with the EP/channel.

Parameters
USBxSelected device
srcpointer to source buffer
ch_ep_numendpoint or host channel number
lenNumber of bytes to write
dmaUSB dma enabled or disabled This parameter can be one of these values: 0 : DMA feature not used 1 : DMA feature used
Return values
HALstatus

Definition at line 1000 of file stm32f4xx_ll_usb.c.