Skip to content

Commit 63428b5

Browse files
committed
docs: Add USB spec for version and control proxy interfaces.
1 parent fd5c53c commit 63428b5

5 files changed

Lines changed: 41 additions & 1 deletion

File tree

docs/source/developers/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.. toctree::
22
usb_trace_interface
33
usb_power_interface
4+
usb_version_interface
5+
usb_control_proxy_interface
46
writing_documentation
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
USB Control Proxy Interface
2+
===========================
3+
4+
The control proxy interface is identified by ``bInterfaceClass = 0xff`` and ``bInterfaceSubclass = 0x58 ('X')``.
5+
6+
Certain operating systems (e.g. Windows) disallows issuing control requests to an interface that's already claimed for bulk transfer by another process.
7+
To allow e.g. configuring the :ref:`usb_trace_interface` while it's already opened for capture, this interface is provided as a workaround.
8+
9+
Control Requests
10+
----------------
11+
12+
Control requests are vendor-specific interface-directed, i.e. with ``bmRequestType = 0x41 or 0xc1``
13+
and the lower half of ``wIndex`` containing the ``bInterfaceNumber`` of this interface.
14+
15+
``bRequest`` has a range for each supported target interface with an associated offset.
16+
When a request is handled, the offset is subtracted from ``bRequest`` and the request is forwarded to the target interface's handler.
17+
18+
19+
============== ====== ==========================
20+
bRequest range Offset Target interface
21+
============== ====== ==========================
22+
0x01 - 0x0f 0x00 :ref:`usb_trace_interface`
23+
============== ====== ==========================

docs/source/developers/usb_power_interface.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
USB Power Interface
22
===================
33

4-
The trace interface is identified by ``bInterfaceClass = 0xff`` and ``bInterfaceSubclass = 0x50 ('P')``.
4+
The power interface is identified by ``bInterfaceClass = 0xff`` and ``bInterfaceSubclass = 0x50 ('P')``.
55

66
Control Requests
77
----------------

docs/source/developers/usb_trace_interface.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _usb_trace_interface:
2+
13
USB Trace Interface
24
===================
35

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
USB Version Interface
2+
=====================
3+
4+
The version interface is identified by ``bInterfaceClass = 0xff`` and ``bInterfaceSubclass = 0x56 ('V')``.
5+
6+
The interface string of the version interface contains the version of the current gateware build, as per ``git describe --always --long --dirty``.
7+
8+
Example: ``Version: v1.0.0-0-g3ad3fa4``
9+
10+
Control Requests
11+
----------------
12+
13+
The version interface currently has no defined control requests.

0 commit comments

Comments
 (0)