-
Notifications
You must be signed in to change notification settings - Fork 406
Open
Description
The teensy4 usb_desc.h contain a mix of configurations where the same USB endpoint number is used for both transmit & receive for a given interface, and configurations where different endpoint numbers are used. The former puzzles me, since I though USB data endpoints were supposed to be unidirectional.
Some examples of same endpoint numbers:
USB_DUAL_SERIALdefines bothCDC_RX_ENDPOINTandCDC_TX_ENDPOINTto 3.USB_DUAL_SERIALdefines bothCDC2_RX_ENDPOINTandCDC2_TX_ENDPOINTto 5.USB_KEYBOARDONLYdefines bothSEREMU_TX_ENDPOINTandSEREMU_RX_ENDPOINTto 2.USB_MIDIdefines bothSEREMU_TX_ENDPOINTandSEREMU_RX_ENDPOINTto 2.USB_MIDIdefines bothMIDI_TX_ENDPOINTandMIDI_RX_ENDPOINTto 3.USB_FLIGHTSIMdefines bothFLIGHTSIM_TX_ENDPOINTandFLIGHTSIM_RX_ENDPOINTto 3.
It seems endpoint number reuse is enabled by a bEndpointAddress =| 0x80 in the USB configuration descriptor, which increases the actual endpoint number by 128.
Some examples of different endpoint numbers:
USB_SERIALdefinesCDC_RX_ENDPOINTto 3 andCDC_TX_ENDPOINTto 4.USB_RAWHIDdefinesRAWHID_TX_ENDPOINTto 3 andRAWHID_RX_ENDPOINTto 4.USB_EVERYTHINGcontains a commented-outMTP_TX_ENDPOINTdefine to 11 andMTP_RX_ENDPOINTdefine to 3.
Could it make sense to either always use the same endpoint number for TX & RX, or always use different numbers?
some exam
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels