CMSIS-Driver: Driver_USB.h File Reference

| CMSIS-Driver Version 2.8.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 (0U)
#define | ARM_USB_ROLE_HOST (1U)
#define | ARM_USB_ROLE_DEVICE (2U)
#define | ARM_USB_PIN_DP (1U << 0)
| USB D+ pin. More...
#define | ARM_USB_PIN_DM (1U << 1)
| USB D- pin. More...
#define | ARM_USB_PIN_VBUS (1U << 2)
| USB VBUS pin. More...
#define | ARM_USB_PIN_OC (1U << 3)
| USB OverCurrent pin. More...
#define | ARM_USB_PIN_ID (1U << 4)
| USB ID pin. More...
#define | ARM_USB_SPEED_LOW (0U)
| Low-speed USB. More...
#define | ARM_USB_SPEED_FULL (1U)
| Full-speed USB. More...
#define | ARM_USB_SPEED_HIGH (2U)
| High-speed USB. More...
#define | ARM_USB_PID_OUT (1U)
#define | ARM_USB_PID_IN (9U)
#define | ARM_USB_PID_SOF (5U)
#define | ARM_USB_PID_SETUP (13U)
#define | ARM_USB_PID_DATA0 (3U)
#define | ARM_USB_PID_DATA1 (11U)
#define | ARM_USB_PID_DATA2 (7U)
#define | ARM_USB_PID_MDATA (15U)
#define | ARM_USB_PID_ACK (2U)
#define | ARM_USB_PID_NAK (10U)
#define | ARM_USB_PID_STALL (14U)
#define | ARM_USB_PID_NYET (6U)
#define | ARM_USB_PID_PRE (12U)
#define | ARM_USB_PID_ERR (12U)
#define | ARM_USB_PID_SPLIT (8U)
#define | ARM_USB_PID_PING (4U)
#define | ARM_USB_PID_RESERVED (0U)
#define | ARM_USB_ENDPOINT_NUMBER_MASK (0x0FU)
#define | ARM_USB_ENDPOINT_DIRECTION_MASK (0x80U)
#define | ARM_USB_ENDPOINT_CONTROL (0U)
| Control Endpoint. More...
#define | ARM_USB_ENDPOINT_ISOCHRONOUS (1U)
| Isochronous Endpoint. More...
#define | ARM_USB_ENDPOINT_BULK (2U)
| Bulk Endpoint. More...
#define | ARM_USB_ENDPOINT_INTERRUPT (3U)
| Interrupt Endpoint. More...
#define | ARM_USB_ENDPOINT_MAX_PACKET_SIZE_MASK (0x07FFU)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_MASK (0x1800U)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_1 (0x0000U)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_2 (0x0800U)
#define | ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_3 (0x1000U)

## Macro Definition Documentation

#define ARM_USB_ROLE_NONE (0U)

#define ARM_USB_ROLE_HOST (1U)

#define ARM_USB_ROLE_DEVICE (2U)

#define ARM_USB_PIN_DP (1U << 0)

USB D+ pin.

#define ARM_USB_PIN_DM (1U << 1)

USB D- pin.

#define ARM_USB_PIN_VBUS (1U << 2)

USB VBUS pin.

#define ARM_USB_PIN_OC (1U << 3)

USB OverCurrent pin.

#define ARM_USB_PIN_ID (1U << 4)

USB ID pin.

#define ARM_USB_PID_OUT (1U)

#define ARM_USB_PID_IN (9U)

#define ARM_USB_PID_SOF (5U)

#define ARM_USB_PID_SETUP (13U)

#define ARM_USB_PID_DATA0 (3U)

#define ARM_USB_PID_DATA1 (11U)

#define ARM_USB_PID_DATA2 (7U)

#define ARM_USB_PID_MDATA (15U)

#define ARM_USB_PID_ACK (2U)

#define ARM_USB_PID_NAK (10U)

#define ARM_USB_PID_STALL (14U)

#define ARM_USB_PID_NYET (6U)

#define ARM_USB_PID_PRE (12U)

#define ARM_USB_PID_ERR (12U)

#define ARM_USB_PID_SPLIT (8U)

#define ARM_USB_PID_PING (4U)

#define ARM_USB_PID_RESERVED (0U)

#define ARM_USB_ENDPOINT_NUMBER_MASK (0x0FU)

#define ARM_USB_ENDPOINT_DIRECTION_MASK (0x80U)

#define ARM_USB_ENDPOINT_MAX_PACKET_SIZE_MASK (0x07FFU)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_MASK (0x1800U)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_1 (0x0000U)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_2 (0x0800U)

#define ARM_USB_ENDPOINT_MICROFRAME_TRANSACTIONS_3 (0x1000U)