M471M/R1/S BSP V3.01.000
The Board Support Package for M4521
Modules | Macros
Collaboration diagram for USBD Exported Constants:

Modules

 USBD Exported Functions
 

Macros

#define USBD_BUF_BASE   (USBD_BASE+0x100)
 
#define USBD_MAX_EP   8
 
#define EP0   0
 
#define EP1   1
 
#define EP2   2
 
#define EP3   3
 
#define EP4   4
 
#define EP5   5
 
#define EP6   6
 
#define EP7   7
 
#define REQ_STANDARD   0x00
 
#define REQ_CLASS   0x20
 
#define REQ_VENDOR   0x40
 
#define GET_STATUS   0x00
 
#define CLEAR_FEATURE   0x01
 
#define SET_FEATURE   0x03
 
#define SET_ADDRESS   0x05
 
#define GET_DESCRIPTOR   0x06
 
#define SET_DESCRIPTOR   0x07
 
#define GET_CONFIGURATION   0x08
 
#define SET_CONFIGURATION   0x09
 
#define GET_INTERFACE   0x0A
 
#define SET_INTERFACE   0x0B
 
#define SYNC_FRAME   0x0C
 
#define DESC_DEVICE   0x01
 
#define DESC_CONFIG   0x02
 
#define DESC_STRING   0x03
 
#define DESC_INTERFACE   0x04
 
#define DESC_ENDPOINT   0x05
 
#define DESC_QUALIFIER   0x06
 
#define DESC_OTHERSPEED   0x07
 
#define DESC_HID   0x21
 
#define DESC_HID_RPT   0x22
 
#define LEN_DEVICE   18
 
#define LEN_CONFIG   9
 
#define LEN_INTERFACE   9
 
#define LEN_ENDPOINT   7
 
#define LEN_HID   9
 
#define LEN_CCID   0x36
 
#define EP_ISO   0x01
 
#define EP_BULK   0x02
 
#define EP_INT   0x03
 
#define EP_INPUT   0x80
 
#define EP_OUTPUT   0x00
 
#define FEATURE_DEVICE_REMOTE_WAKEUP   0x01
 
#define FEATURE_ENDPOINT_HALT   0x00
 
#define USBD_WAKEUP_EN   USBD_INTEN_WKEN_Msk
 
#define USBD_DRVSE0   USBD_SE0_SE0_Msk
 
#define USBD_DPPU_EN   USBD_ATTR_DPPUEN_Msk
 
#define USBD_PWRDN   USBD_ATTR_PWRDN_Msk
 
#define USBD_PHY_EN   USBD_ATTR_PHYEN_Msk
 
#define USBD_USB_EN   USBD_ATTR_USBEN_Msk
 
#define USBD_INT_BUS   USBD_INTEN_BUSIEN_Msk
 
#define USBD_INT_USB   USBD_INTEN_USBIEN_Msk
 
#define USBD_INT_FLDET   USBD_INTEN_VBDETIEN_Msk
 
#define USBD_INT_WAKEUP   (USBD_INTEN_NEVWKIEN_Msk | USBD_INTEN_WKEN_Msk)
 
#define USBD_INTSTS_WAKEUP   USBD_INTSTS_NEVWKIF_Msk
 
#define USBD_INTSTS_FLDET   USBD_INTSTS_VBDETIF_Msk
 
#define USBD_INTSTS_BUS   USBD_INTSTS_BUSIF_Msk
 
#define USBD_INTSTS_USB   USBD_INTSTS_USBIF_Msk
 
#define USBD_INTSTS_SETUP   USBD_INTSTS_SETUP_Msk
 
#define USBD_INTSTS_EP0   USBD_INTSTS_EPEVT0_Msk
 
#define USBD_INTSTS_EP1   USBD_INTSTS_EPEVT1_Msk
 
#define USBD_INTSTS_EP2   USBD_INTSTS_EPEVT2_Msk
 
#define USBD_INTSTS_EP3   USBD_INTSTS_EPEVT3_Msk
 
#define USBD_INTSTS_EP4   USBD_INTSTS_EPEVT4_Msk
 
#define USBD_INTSTS_EP5   USBD_INTSTS_EPEVT5_Msk
 
#define USBD_INTSTS_EP6   USBD_INTSTS_EPEVT6_Msk
 
#define USBD_INTSTS_EP7   USBD_INTSTS_EPEVT7_Msk
 
#define USBD_STATE_USBRST   USBD_ATTR_USBRST_Msk
 
#define USBD_STATE_SUSPEND   USBD_ATTR_SUSPEND_Msk
 
#define USBD_STATE_RESUME   USBD_ATTR_RESUME_Msk
 
#define USBD_STATE_TIMEOUT   USBD_ATTR_TOUT_Msk
 
#define USBD_CFGP_SSTALL   USBD_CFGP_SSTALL_Msk
 
#define USBD_CFG_CSTALL   USBD_CFG_CSTALL_Msk
 
#define USBD_CFG_EPMODE_DISABLE   (0ul << USBD_CFG_STATE_Pos)
 
#define USBD_CFG_EPMODE_OUT   (1ul << USBD_CFG_STATE_Pos)
 
#define USBD_CFG_EPMODE_IN   (2ul << USBD_CFG_STATE_Pos)
 
#define USBD_CFG_TYPE_ISO   (1ul << USBD_CFG_ISOCH_Pos)
 

Detailed Description

Macro Definition Documentation

◆ CLEAR_FEATURE

#define CLEAR_FEATURE   0x01

Definition at line 64 of file usbd.h.

◆ DESC_CONFIG

#define DESC_CONFIG   0x02

Definition at line 77 of file usbd.h.

◆ DESC_DEVICE

#define DESC_DEVICE   0x01

Definition at line 76 of file usbd.h.

◆ DESC_ENDPOINT

#define DESC_ENDPOINT   0x05

Definition at line 80 of file usbd.h.

◆ DESC_HID

#define DESC_HID   0x21

Definition at line 85 of file usbd.h.

◆ DESC_HID_RPT

#define DESC_HID_RPT   0x22

USB Descriptor Length

Definition at line 88 of file usbd.h.

◆ DESC_INTERFACE

#define DESC_INTERFACE   0x04

Definition at line 79 of file usbd.h.

◆ DESC_OTHERSPEED

#define DESC_OTHERSPEED   0x07

USB HID Descriptor Type

Definition at line 84 of file usbd.h.

◆ DESC_QUALIFIER

#define DESC_QUALIFIER   0x06

Definition at line 81 of file usbd.h.

◆ DESC_STRING

#define DESC_STRING   0x03

Definition at line 78 of file usbd.h.

◆ EP0

#define EP0   0

Endpoint 0

Definition at line 47 of file usbd.h.

◆ EP1

#define EP1   1

Endpoint 1

Definition at line 48 of file usbd.h.

◆ EP2

#define EP2   2

Endpoint 2

Definition at line 49 of file usbd.h.

◆ EP3

#define EP3   3

Endpoint 3

Definition at line 50 of file usbd.h.

◆ EP4

#define EP4   4

Endpoint 4

Definition at line 51 of file usbd.h.

◆ EP5

#define EP5   5

Endpoint 5

Definition at line 52 of file usbd.h.

◆ EP6

#define EP6   6

Endpoint 6

Definition at line 53 of file usbd.h.

◆ EP7

#define EP7   7

Endpoint 7 USB Request Type

Definition at line 57 of file usbd.h.

◆ EP_BULK

#define EP_BULK   0x02

Definition at line 98 of file usbd.h.

◆ EP_INPUT

#define EP_INPUT   0x80

Definition at line 101 of file usbd.h.

◆ EP_INT

#define EP_INT   0x03

Definition at line 99 of file usbd.h.

◆ EP_ISO

#define EP_ISO   0x01

Definition at line 97 of file usbd.h.

◆ EP_OUTPUT

#define EP_OUTPUT   0x00

USB Feature Selector

Definition at line 104 of file usbd.h.

◆ FEATURE_DEVICE_REMOTE_WAKEUP

#define FEATURE_DEVICE_REMOTE_WAKEUP   0x01

Definition at line 105 of file usbd.h.

◆ FEATURE_ENDPOINT_HALT

#define FEATURE_ENDPOINT_HALT   0x00

Definition at line 106 of file usbd.h.

◆ GET_CONFIGURATION

#define GET_CONFIGURATION   0x08

Definition at line 69 of file usbd.h.

◆ GET_DESCRIPTOR

#define GET_DESCRIPTOR   0x06

Definition at line 67 of file usbd.h.

◆ GET_INTERFACE

#define GET_INTERFACE   0x0A

Definition at line 71 of file usbd.h.

◆ GET_STATUS

#define GET_STATUS   0x00

Definition at line 63 of file usbd.h.

◆ LEN_CCID

#define LEN_CCID   0x36

USB Endpoint Type

Definition at line 96 of file usbd.h.

◆ LEN_CONFIG

#define LEN_CONFIG   9

Definition at line 90 of file usbd.h.

◆ LEN_DEVICE

#define LEN_DEVICE   18

Definition at line 89 of file usbd.h.

◆ LEN_ENDPOINT

#define LEN_ENDPOINT   7

Definition at line 92 of file usbd.h.

◆ LEN_HID

#define LEN_HID   9

Definition at line 93 of file usbd.h.

◆ LEN_INTERFACE

#define LEN_INTERFACE   9

Definition at line 91 of file usbd.h.

◆ REQ_CLASS

#define REQ_CLASS   0x20

Definition at line 59 of file usbd.h.

◆ REQ_STANDARD

#define REQ_STANDARD   0x00

Definition at line 58 of file usbd.h.

◆ REQ_VENDOR

#define REQ_VENDOR   0x40

USB Standard Request

Definition at line 62 of file usbd.h.

◆ SET_ADDRESS

#define SET_ADDRESS   0x05

Definition at line 66 of file usbd.h.

◆ SET_CONFIGURATION

#define SET_CONFIGURATION   0x09

Definition at line 70 of file usbd.h.

◆ SET_DESCRIPTOR

#define SET_DESCRIPTOR   0x07

Definition at line 68 of file usbd.h.

◆ SET_FEATURE

#define SET_FEATURE   0x03

Definition at line 65 of file usbd.h.

◆ SET_INTERFACE

#define SET_INTERFACE   0x0B

Definition at line 72 of file usbd.h.

◆ SYNC_FRAME

#define SYNC_FRAME   0x0C

USB Descriptor Type

Definition at line 75 of file usbd.h.

◆ USBD_BUF_BASE

#define USBD_BUF_BASE   (USBD_BASE+0x100)

Definition at line 44 of file usbd.h.

◆ USBD_CFG_CSTALL

#define USBD_CFG_CSTALL   USBD_CFG_CSTALL_Msk

Clear Stall

Definition at line 145 of file usbd.h.

◆ USBD_CFG_EPMODE_DISABLE

#define USBD_CFG_EPMODE_DISABLE   (0ul << USBD_CFG_STATE_Pos)

Endpoint Disable

Definition at line 147 of file usbd.h.

◆ USBD_CFG_EPMODE_IN

#define USBD_CFG_EPMODE_IN   (2ul << USBD_CFG_STATE_Pos)

In Endpoint

Definition at line 149 of file usbd.h.

◆ USBD_CFG_EPMODE_OUT

#define USBD_CFG_EPMODE_OUT   (1ul << USBD_CFG_STATE_Pos)

Out Endpoint

Definition at line 148 of file usbd.h.

◆ USBD_CFG_TYPE_ISO

#define USBD_CFG_TYPE_ISO   (1ul << USBD_CFG_ISOCH_Pos)

Isochronous

Definition at line 150 of file usbd.h.

◆ USBD_CFGP_SSTALL

#define USBD_CFGP_SSTALL   USBD_CFGP_SSTALL_Msk

Set Stall

Definition at line 144 of file usbd.h.

◆ USBD_DPPU_EN

#define USBD_DPPU_EN   USBD_ATTR_DPPUEN_Msk

USB D+ Pull-up Enable

Definition at line 115 of file usbd.h.

◆ USBD_DRVSE0

#define USBD_DRVSE0   USBD_SE0_SE0_Msk

Drive SE0

Definition at line 113 of file usbd.h.

◆ USBD_INT_BUS

#define USBD_INT_BUS   USBD_INTEN_BUSIEN_Msk

USB Bus Event Interrupt

Definition at line 120 of file usbd.h.

◆ USBD_INT_FLDET

#define USBD_INT_FLDET   USBD_INTEN_VBDETIEN_Msk

USB VBUS Detection Interrupt

Definition at line 122 of file usbd.h.

◆ USBD_INT_USB

#define USBD_INT_USB   USBD_INTEN_USBIEN_Msk

USB Event Interrupt

Definition at line 121 of file usbd.h.

◆ USBD_INT_WAKEUP

#define USBD_INT_WAKEUP   (USBD_INTEN_NEVWKIEN_Msk | USBD_INTEN_WKEN_Msk)

USB No-Event-Wake-Up Interrupt

Definition at line 123 of file usbd.h.

◆ USBD_INTSTS_BUS

#define USBD_INTSTS_BUS   USBD_INTSTS_BUSIF_Msk

USB Bus Event Interrupt Status

Definition at line 127 of file usbd.h.

◆ USBD_INTSTS_EP0

#define USBD_INTSTS_EP0   USBD_INTSTS_EPEVT0_Msk

USB Endpoint 0 Event

Definition at line 130 of file usbd.h.

◆ USBD_INTSTS_EP1

#define USBD_INTSTS_EP1   USBD_INTSTS_EPEVT1_Msk

USB Endpoint 1 Event

Definition at line 131 of file usbd.h.

◆ USBD_INTSTS_EP2

#define USBD_INTSTS_EP2   USBD_INTSTS_EPEVT2_Msk

USB Endpoint 2 Event

Definition at line 132 of file usbd.h.

◆ USBD_INTSTS_EP3

#define USBD_INTSTS_EP3   USBD_INTSTS_EPEVT3_Msk

USB Endpoint 3 Event

Definition at line 133 of file usbd.h.

◆ USBD_INTSTS_EP4

#define USBD_INTSTS_EP4   USBD_INTSTS_EPEVT4_Msk

USB Endpoint 4 Event

Definition at line 134 of file usbd.h.

◆ USBD_INTSTS_EP5

#define USBD_INTSTS_EP5   USBD_INTSTS_EPEVT5_Msk

USB Endpoint 5 Event

Definition at line 135 of file usbd.h.

◆ USBD_INTSTS_EP6

#define USBD_INTSTS_EP6   USBD_INTSTS_EPEVT6_Msk

USB Endpoint 6 Event

Definition at line 136 of file usbd.h.

◆ USBD_INTSTS_EP7

#define USBD_INTSTS_EP7   USBD_INTSTS_EPEVT7_Msk

USB Endpoint 7 Event

Definition at line 137 of file usbd.h.

◆ USBD_INTSTS_FLDET

#define USBD_INTSTS_FLDET   USBD_INTSTS_VBDETIF_Msk

USB Float Detect Interrupt Status

Definition at line 126 of file usbd.h.

◆ USBD_INTSTS_SETUP

#define USBD_INTSTS_SETUP   USBD_INTSTS_SETUP_Msk

USB Setup Event

Definition at line 129 of file usbd.h.

◆ USBD_INTSTS_USB

#define USBD_INTSTS_USB   USBD_INTSTS_USBIF_Msk

USB Event Interrupt Status

Definition at line 128 of file usbd.h.

◆ USBD_INTSTS_WAKEUP

#define USBD_INTSTS_WAKEUP   USBD_INTSTS_NEVWKIF_Msk

USB No-Event-Wake-Up Interrupt Status

Definition at line 125 of file usbd.h.

◆ USBD_MAX_EP

#define USBD_MAX_EP   8

Definition at line 45 of file usbd.h.

◆ USBD_PHY_EN

#define USBD_PHY_EN   USBD_ATTR_PHYEN_Msk

PHY Enable

Definition at line 117 of file usbd.h.

◆ USBD_PWRDN

#define USBD_PWRDN   USBD_ATTR_PWRDN_Msk

PHY Turn-On

Definition at line 116 of file usbd.h.

◆ USBD_STATE_RESUME

#define USBD_STATE_RESUME   USBD_ATTR_RESUME_Msk

USB Bus Resume

Definition at line 141 of file usbd.h.

◆ USBD_STATE_SUSPEND

#define USBD_STATE_SUSPEND   USBD_ATTR_SUSPEND_Msk

USB Bus Suspend

Definition at line 140 of file usbd.h.

◆ USBD_STATE_TIMEOUT

#define USBD_STATE_TIMEOUT   USBD_ATTR_TOUT_Msk

USB Bus Timeout

Definition at line 142 of file usbd.h.

◆ USBD_STATE_USBRST

#define USBD_STATE_USBRST   USBD_ATTR_USBRST_Msk

USB Bus Reset

Definition at line 139 of file usbd.h.

◆ USBD_USB_EN

#define USBD_USB_EN   USBD_ATTR_USBEN_Msk

USB Enable

Definition at line 118 of file usbd.h.

◆ USBD_WAKEUP_EN

#define USBD_WAKEUP_EN   USBD_INTEN_WKEN_Msk

USB Wake-up Enable

Definition at line 112 of file usbd.h.