tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
RE: ugen vs interfaces
> So when I open /dev/ugen1.02 and read, it uses 0x82, but if I write, it
> uses 0x02? Or at least it should? Because there is no /dev/ugen1.130
> or any such - nor does the minor-number cracking code in the driver
> show anything of the sort.
That is what I would guess.
> Ooo. So an interface is not actually visible on the wire, except in
> the form of the device saying "here, put these fragments together and
> they collectively form a conceptual thing" when queried? Things make a
> bit more sense to me now.
That is exactly true. Interfaces can be discovered, but in the low-level
protocol packets are addressed with a 7-bit device address and a 4-bit
endpoint address (with the further understanding that the endpoint address
for OUT transactions is independent of the address for IN transactions).
Even when sending control messages to interfaces, a bus analyzer sees a
control transaction to endpoint 0, and a a SETUP packet. The packet (in byte
0) indicates "this is for an interface" and (in byte 3, if memory serves)
further indicates "this is for interface N" -- and 4 of the other 6 bytes
can be used to pass additional protocol-specific information. (A further
payload can be sent, or received, but not both.) The control transactions
are basically an RPC, where you can write L bytes and get 1 bit of status;
or read (up to) L bytes or get one bit of error status. So the device
software does muxing.
Best regards,
--Terry
Home |
Main Index |
Thread Index |
Old Index