tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
tusb_descriptor_endpoint_t Struct Reference

USB Standard Endpoint Descriptor (section 9.6.1 table 9-13) More...

#include <std_descriptors.h>

Data Fields

uint8_t bLength
 Size of this descriptor in bytes.
 
uint8_t bDescriptorType
 ENDPOINT Descriptor Type.
 
uint8_t 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.
 
struct {
   uint8_t   xfer: 2
 
   uint8_t   sync: 2
 
   uint8_t   usage: 2
 
   uint8_t   __pad0__: 2
 
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.
 
struct {
   uint16_t   size: 11
 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.
 
   uint16_t   hs_period_mult: 2
 
   uint16_t   __pad0__: 0
 
wMaxPacketSize
 
uint8_t 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 us 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 $ 2^(bInterval-1) $ value; e.g., a bInterval of 4 means a period of 8 ( $ 2^(4-1) $).
- 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 $ 2^(bInterval-1) $ value; e.g., a bInterval of 4 means a period of 8 ( $ 2^(4-1) $) . 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.
 

Detailed Description

USB Standard Endpoint Descriptor (section 9.6.1 table 9-13)

Definition at line 104 of file std_descriptors.h.


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