Loading...
Searching...
No Matches
usbdev_synopsys_dwc2.h File Reference

Low level USB FS/HS driver definitions for MCUs with Synopsys DWC2 IP core. More...

Detailed Description

Low level USB FS/HS driver definitions for MCUs with Synopsys DWC2 IP core.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file usbdev_synopsys_dwc2.h.

#include <stdint.h>
+ Include dependency graph for usbdev_synopsys_dwc2.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dwc2_usb_otg_fshs_config_t
 USB OTG configuration. More...
 
#define USBDEV_CPU_SET_ADDR_AFTER_STATUS   0
 USB OTG peripheral requirement for setting the device address.
 
enum  dwc2_usb_otg_fshs_type_t { DWC2_USB_OTG_FS = 0 , DWC2_USB_OTG_HS = 1 }
 USB OTG peripheral type. More...
 
enum  { DWC2_USB_OTG_DSPD_HS = 0 , DWC2_USB_OTG_DSPD_FS_PHY_HS = 1 , DWC2_USB_OTG_DSPD_LS = 2 , DWC2_USB_OTG_DSPD_FS = 3 }
 Device speed used. More...
 
enum  dwc2_usb_otg_fshs_phy_t { DWC2_USB_OTG_PHY_BUILTIN , DWC2_USB_OTG_PHY_ULPI , DWC2_USB_OTG_PHY_UTMI }
 Type of USB OTG peripheral PHY. More...
 

Macro Definition Documentation

◆ USBDEV_CPU_SET_ADDR_AFTER_STATUS

#define USBDEV_CPU_SET_ADDR_AFTER_STATUS   0

USB OTG peripheral requirement for setting the device address.

The address in the USB device has to be directly after the SETUP stage on receipt of the SET ADDRESS Request.

Definition at line 36 of file usbdev_synopsys_dwc2.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Device speed used.

Enumerator
DWC2_USB_OTG_DSPD_HS 

High speed.

DWC2_USB_OTG_DSPD_FS_PHY_HS 

Full speed on HS PHY.

DWC2_USB_OTG_DSPD_LS 

Low speed.

DWC2_USB_OTG_DSPD_FS 

Full speed.

Definition at line 55 of file usbdev_synopsys_dwc2.h.

◆ dwc2_usb_otg_fshs_phy_t

Type of USB OTG peripheral PHY.

The FS type only supports the built-in PHY, the HS type can have enabled either

  • the on-chip FS PHY,
  • the external ULPI HS PHY interface, or
  • the internal UTMI HS PHY.
Enumerator
DWC2_USB_OTG_PHY_BUILTIN 

on-chip FS PHY

DWC2_USB_OTG_PHY_ULPI 

ULPI for external HS PHY.

DWC2_USB_OTG_PHY_UTMI 

UTMI for internal HS PHY.

Definition at line 71 of file usbdev_synopsys_dwc2.h.

◆ dwc2_usb_otg_fshs_type_t

USB OTG peripheral type.

High speed peripheral is assumed to have DMA support available.

Warning
Only one of each type is supported at the moment, it is not supported to have two FS type or two HS type peripherals enabled on a single MCU.
Enumerator
DWC2_USB_OTG_FS 

Full speed peripheral.

DWC2_USB_OTG_HS 

High speed peripheral.

Definition at line 47 of file usbdev_synopsys_dwc2.h.