4.4.3.2.10 USB_DescriptorConfigurationEnable()

RETURN_CODE_t USB_DescriptorConfigurationEnable (uint8_t configurationValue)

Enables endpoint configuration descriptor.

The USB Device Enable Endpoint function, from USB 2.0 Specification Ch. 9.6.6.

Offset

Field

Size

Value

Description

0

bLength

1

Number

Size of this descriptor in bytes

1

bDescriptorType

1

Constant

CONFIGURATION Descriptor Type

2

bEndpointAddress

1

Endpoint

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

3

bmAttributes

1

Bitmap

Describes the endpoint attributes when it is configured using the bConfigurationValue. Bit 1-0: Transfer type, 00=Control, 01=Isochronous, 10=Bulk, 11=Interrupt. If not isochronous endpoint, bit 5-2 are reserved and must be set to zero. If isochronous: Bit 3-2: Synchronization type, 00 = No Sync, 01 = Async, 10 = Adaptive, 11 = Sync. Bit 5-4: Usage type, 00 = Data endpoint, 01 = Feedback endpoint, 10 = Implicit feedback Data endpoint, 11 = Reserved. All other bits are reserved and must be reset to zero. Reserved bits must be ignored by the host.

4

wMaxPacketSize

2

Number

Maximum packet size this endpoint is capable of RX/TX when this configuration is selected. For isochronous endpoints, this value is used to reserve bus time in the schedule. For all endpoints, bit 10-0 specify maximum packet size. For high-speed isochronous and interrupt endpoints: Bit 12-11 number of additional transaction opportunities per microframe, 00 = None (1 transaction per microframe), 01 = 1 additional, 10 = 2 additional, 11 = Reserved. Bits 15-13 are reserved and must be set to zero.

Parameters:
configurationValue

- The value of the configuration to be enabled

Returns:

SUCCESS or an Error code according to RETURN_CODE_t