| USBD ROM Stack 1.0 ROM based USB device stack

Data Fields
USB_ENDPOINT_DESCRIPTOR Struct Reference
USB Core Layer

`#include <mw_usbd/mw_usbd.h>`

## Data Fields
uint8_t | bLength
uint8_t | bDescriptorType
uint8_t | bEndpointAddress
uint8_t | bmAttributes
uint16_t | wMaxPacketSize
uint8_t | bInterval

## Detailed Description

USB Standard Endpoint Descriptor

## Field Documentation

## ◆ bLength

uint8_t USB_ENDPOINT_DESCRIPTOR::bLength

Size of this descriptor in bytes

## ◆ bDescriptorType

uint8_t USB_ENDPOINT_DESCRIPTOR::bDescriptorType

ENDPOINT Descriptor Type

## ◆ bEndpointAddress

uint8_t USB_ENDPOINT_DESCRIPTOR::bEndpointAddress

The address of the endpoint on the USB device described by this descriptor. The address is encoded as follows:
Bit 3...0: The endpoint number
Bit 6...4: Reserved, reset to zero
Bit 7: Direction, ignored for control endpoints 0 = OUT endpoint 1 = IN endpoint.

See also
  USBD_ENDPOINT_ADR_Type

## ◆ bmAttributes

uint8_t USB_ENDPOINT_DESCRIPTOR::bmAttributes

This field describes the endpoint’s attributes when it is configured using the bConfigurationValue.
Bits 1..0: Transfer Type

- 00 = Control
- 01 = Isochronous
- 10 = Bulk
- 11 = Interrupt
  If not an isochronous endpoint, bits 5..2 are reserved and must be set to zero. If isochronous, they are defined as follows:
  Bits 3..2: Synchronization Type
- 00 = No Synchronization
- 01 = Asynchronous
- 10 = Adaptive
- 11 = Synchronous
  Bits 5..4: Usage Type
- 00 = Data endpoint
- 01 = Feedback endpoint
- 10 = Implicit feedback Data endpoint
- 11 = Reserved
  Refer to Chapter 5 of USB 2.0 specification for more information.
  All other bits are reserved and must be reset to zero. Reserved bits must be ignored by the host.
  See also
    USBD_EP_ATTR_Type

## ◆ wMaxPacketSize

uint16_t USB_ENDPOINT_DESCRIPTOR::wMaxPacketSize

Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected.
For isochronous endpoints, this value is used to reserve the bus time in the schedule, required for the per-(micro)frame data payloads. The pipe may, on an ongoing basis, actually use less bandwidth than that reserved. The device reports, if necessary, the actual bandwidth used via its normal, non-USB defined mechanisms.
For all endpoints, bits 10..0 specify the maximum packet size (in bytes).
For high-speed isochronous and interrupt endpoints:
Bits 12..11 specify the number of additional transaction opportunities per microframe:

- 00 = None (1 transaction per microframe)
- 01 = 1 additional (2 per microframe)
- 10 = 2 additional (3 per microframe)
- 11 = Reserved
  Bits 15..13 are reserved and must be set to zero.

## ◆ bInterval

uint8_t USB_ENDPOINT_DESCRIPTOR::bInterval

Interval for polling endpoint for data transfers. Expressed in frames or microframes depending on the device operating speed (i.e., either 1 millisecond or 125 µs units).

- For full-/high-speed isochronous endpoints, this value must be in the range from 1 to 16. The bInterval value is used as the exponent for a value; e.g., a bInterval of 4 means a period of 8 ( ).
- For full-/low-speed interrupt endpoints, the value of this field may be from 1 to 255.
- For high-speed interrupt endpoints, the bInterval value is used as the exponent for a value; e.g., a bInterval of 4 means a period of 8 ( ) . This value must be from 1 to 16.
- For high-speed bulk/control OUT endpoints, the bInterval must specify the maximum NAK rate of the endpoint. A value of 0 indicates the endpoint never NAKs. Other values indicate at most 1 NAK each bInterval number of microframes. This value must be in the range from 0 to 255.
  Refer to Chapter 5 of USB 2.0 specification for more information.

The documentation for this struct was generated from the following file:

- mw_usbd/mw_usbd.h