You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_SERIAL defines both CDC_RX_ENDPOINT and CDC_TX_ENDPOINT to 3.
USB_DUAL_SERIAL defines both CDC2_RX_ENDPOINT and CDC2_TX_ENDPOINT to 5.
USB_KEYBOARDONLY defines both SEREMU_TX_ENDPOINT and SEREMU_RX_ENDPOINT to 2.
USB_MIDI defines both SEREMU_TX_ENDPOINT and SEREMU_RX_ENDPOINT to 2.
USB_MIDI defines both MIDI_TX_ENDPOINT and MIDI_RX_ENDPOINT to 3.
USB_FLIGHTSIM defines both FLIGHTSIM_TX_ENDPOINT and FLIGHTSIM_RX_ENDPOINT to 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_SERIAL defines CDC_RX_ENDPOINT to 3 and CDC_TX_ENDPOINT to 4.
USB_RAWHID defines RAWHID_TX_ENDPOINT to 3 and RAWHID_RX_ENDPOINT to 4.
USB_EVERYTHING contains a commented-out MTP_TX_ENDPOINT define to 11 and MTP_RX_ENDPOINT define to 3.
Could it make sense to either always use the same endpoint number for TX & RX, or always use different numbers?
some exam
The text was updated successfully, but these errors were encountered:
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_SERIAL
defines bothCDC_RX_ENDPOINT
andCDC_TX_ENDPOINT
to 3.USB_DUAL_SERIAL
defines bothCDC2_RX_ENDPOINT
andCDC2_TX_ENDPOINT
to 5.USB_KEYBOARDONLY
defines bothSEREMU_TX_ENDPOINT
andSEREMU_RX_ENDPOINT
to 2.USB_MIDI
defines bothSEREMU_TX_ENDPOINT
andSEREMU_RX_ENDPOINT
to 2.USB_MIDI
defines bothMIDI_TX_ENDPOINT
andMIDI_RX_ENDPOINT
to 3.USB_FLIGHTSIM
defines bothFLIGHTSIM_TX_ENDPOINT
andFLIGHTSIM_RX_ENDPOINT
to 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_SERIAL
definesCDC_RX_ENDPOINT
to 3 andCDC_TX_ENDPOINT
to 4.USB_RAWHID
definesRAWHID_TX_ENDPOINT
to 3 andRAWHID_RX_ENDPOINT
to 4.USB_EVERYTHING
contains a commented-outMTP_TX_ENDPOINT
define to 11 andMTP_RX_ENDPOINT
define to 3.Could it make sense to either always use the same endpoint number for TX & RX, or always use different numbers?
some exam
The text was updated successfully, but these errors were encountered: