tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ugen vs interfaces
> The following might or might not be helpful.
> Endpoint *addresses* are a flat space in USB. Endpoint *indices*
> within interface are almost never used.
Hm. So, well, ugen(4) says in part
Example: All endpoints (except the control endpoint) for the current con-
figuration can be found by iterating the interface_index from 0 to
config_desc->bNumInterface-1 and for each of these iterating the
endpoint_index from 0 to interface_desc->bNumEndpoints. The config_index
should set to USB_CURRENT_CONFIG_INDEX and alt_index should be set to
USB_CURRENT_ALT_INDEX.
I wrote code to do this (which I can show if it would help), which says
bNumInterface 4
intf 0 bNumEndpoints 1
intf 0 ep 0:
bEndpointAddress 81
bmAttributes 03
wMaxPacketSize 0010
bInterval 01
intf 1 bNumEndpoints 2
intf 1 ep 0:
bEndpointAddress 82
bmAttributes 02
wMaxPacketSize 0040
bInterval 00
intf 1 ep 1:
bEndpointAddress 01
bmAttributes 02
wMaxPacketSize 0040
bInterval 00
intf 2 bNumEndpoints 2
intf 2 ep 0:
bEndpointAddress 83
bmAttributes 02
wMaxPacketSize 0040
bInterval 00
intf 2 ep 1:
bEndpointAddress 02
bmAttributes 02
wMaxPacketSize 0040
bInterval 00
intf 3 bNumEndpoints 0
So the "intf 1 ep 0" endpoint is actually the same thing as the "intf 2
ep 1" endpoint, because they're both address 2, even though one is
UE_DIR_IN and the other is UE_DIR_OUT? Or am I still confused?
What about the "intf 0 ep 0" endpoint, which is address 1, UE_DIR_IN,
UE_INTERRUPT, and the "intf 1 ep 1" endpoint, which is UE_DIR_OUT and
UE_BULK - but also address 1?
Or are the bEndpointAddress values here not the addresses you're
talking about?
Perhaps it would also help to ask "what's an interface"? They seem to
be at the heart of my confusion here....
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index