# Driver_USB.h File Reference

CMSIS-Driver: Driver_USB.h File Reference

| CMSIS-Driver Version 2.6.0 Peripheral Interface for Middleware and Application Code

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Driver_USB.h File Reference

## Macros

#define | ARM_USB_ROLE_NONE (0)
#define | ARM_USB_ROLE_HOST (1)
#define | ARM_USB_ROLE_DEVICE (2)
#define | ARM_USB_PIN_DP (1 << 0)
| USB D+ pin. More...
#define | ARM_USB_PIN_DM (1 << 1)
| USB D- pin. More...
#define | ARM_USB_PIN_VBUS (1 << 2)
| USB VBUS pin. More...
#define | ARM_USB_PIN_OC (1 << 3)
| USB OverCurrent pin. More...
#define | ARM_USB_PIN_ID (1 << 4)
| USB ID pin. More...
#define | ARM_USB_SPEED_LOW (0)
| Low-speed USB. More...
#define | ARM_USB_SPEED_FULL (1)
| Full-speed USB. More...
#define | ARM_USB_SPEED_HIGH (2)
| High-speed USB. More...
#define | ARM_USB_PID_OUT (1)
#define | ARM_USB_PID_IN (9)
#define | ARM_USB_PID_SOF (5)
#define | ARM_USB_PID_SETUP (13)
#define | ARM_USB_PID_DATA0 (3)
#define | ARM_USB_PID_DATA1 (11)
#define | ARM_USB_PID_DATA2 (7)
#define | ARM_USB_PID_MDATA (15)
#define | ARM_USB_PID_ACK (2)
#define | ARM_USB_PID_NAK (10)
#define | ARM_USB_PID_STALL (14)
#define | ARM_USB_PID_NYET (6)
#define | ARM_USB_PID_PRE (12)
#define | ARM_USB_PID_ERR (12)
#define | ARM_USB_PID_SPLIT (8)
#define | ARM_USB_PID_PING (4)
#define | ARM_USB_PID_RESERVED (0)
#define | ARM_USB_ENDPOINT_NUMBER_MASK (0x0F)
#define | ARM_USB_ENDPOINT_DIRECTION_MASK (0x80)
#define | ARM_USB_ENDPOINT_CONTROL (0)
| Control Endpoint. More...
#define | ARM_USB_ENDPOINT_ISOCHRONOUS (1)
| Isochronous Endpoint. More...
#define | ARM_USB_ENDPOINT_BULK (2)
| Bulk Endpoint. More...
#define | ARM_USB_ENDPOINT_INTERRUPT (3)
| Interrupt Endpoint. More...
#define | ARM_USB_ENDPOINT_MAX_PACKET_SIZE_MASK (0x07FF)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_MASK (0x1800)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_1 (0x0000)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_2 (0x0800)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_3 (0x1000)

## Macro Definition Documentation

#define ARM_USB_ROLE_NONE (0)

#define ARM_USB_ROLE_HOST (1)

#define ARM_USB_ROLE_DEVICE (2)

#define ARM_USB_PIN_DP (1 << 0)

USB D+ pin.

#define ARM_USB_PIN_DM (1 << 1)

USB D- pin.

#define ARM_USB_PIN_VBUS (1 << 2)

USB VBUS pin.

#define ARM_USB_PIN_OC (1 << 3)

USB OverCurrent pin.

#define ARM_USB_PIN_ID (1 << 4)

USB ID pin.

#define ARM_USB_PID_OUT (1)

#define ARM_USB_PID_IN (9)

#define ARM_USB_PID_SOF (5)

#define ARM_USB_PID_SETUP (13)

#define ARM_USB_PID_DATA0 (3)

#define ARM_USB_PID_DATA1 (11)

#define ARM_USB_PID_DATA2 (7)

#define ARM_USB_PID_MDATA (15)

#define ARM_USB_PID_ACK (2)

#define ARM_USB_PID_NAK (10)

#define ARM_USB_PID_STALL (14)

#define ARM_USB_PID_NYET (6)

#define ARM_USB_PID_PRE (12)

#define ARM_USB_PID_ERR (12)

#define ARM_USB_PID_SPLIT (8)

#define ARM_USB_PID_PING (4)

#define ARM_USB_PID_RESERVED (0)

#define ARM_USB_ENDPOINT_NUMBER_MASK (0x0F)

#define ARM_USB_ENDPOINT_DIRECTION_MASK (0x80)

#define ARM_USB_ENDPOINT_MAX_PACKET_SIZE_MASK (0x07FF)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_MASK (0x1800)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_1 (0x0000)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_2 (0x0800)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_3 (0x1000)