STM32F4xx_HAL_Driver
1.8.3
|
Header file of USB Low Layer HAL module. More...
Go to the source code of this file.
Data Structures | |
struct | USB_CfgTypeDef |
USB Instance Initialization Structure definition. More... | |
struct | USB_EPTypeDef |
struct | USB_HCTypeDef |
Typedefs | |
typedef USB_ModeTypeDef | USB_OTG_ModeTypeDef |
typedef USB_CfgTypeDef | USB_OTG_CfgTypeDef |
typedef USB_EPTypeDef | USB_OTG_EPTypeDef |
typedef USB_URBStateTypeDef | USB_OTG_URBStateTypeDef |
typedef USB_HCStateTypeDef | USB_OTG_HCStateTypeDef |
typedef USB_HCTypeDef | USB_OTG_HCTypeDef |
Enumerations | |
enum | USB_ModeTypeDef { USB_DEVICE_MODE = 0 , USB_HOST_MODE = 1 , USB_DRD_MODE = 2 } |
USB Mode definition. | |
enum | USB_URBStateTypeDef { URB_IDLE = 0 , URB_DONE , URB_NOTREADY , URB_NYET , URB_ERROR , URB_STALL } |
URB States definition. | |
enum | USB_HCStateTypeDef { HC_IDLE = 0 , HC_XFRC , HC_HALTED , HC_ACK , HC_NAK , HC_NYET , HC_STALL , HC_XACTERR , HC_BBLERR , HC_DATATGLERR } |
Host channel States definition. | |
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... | |
Header file of USB Low Layer HAL module.
Copyright (c) 2016 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file stm32f4xx_ll_usb.h.