@@ -30,22 +30,22 @@ The USB device stack has built-in USB functions. Some can be used directly in
30
30
the user application through a special API, such as HID or Audio class devices,
31
31
while others use a general Zephyr RTOS driver API, such as MSC and CDC class
32
32
implementations. The *Identification string * identifies a class or function
33
- instance (n ) and is used as an argument to the :c:func: `usbd_register_class `.
33
+ instance (` n ` ) and is used as an argument to the :c:func: `usbd_register_class `.
34
34
35
35
+-----------------------------------+-------------------------+-------------------------+
36
36
| Class or function | User API (if any) | Identification string |
37
37
+===================================+=========================+=========================+
38
- | USB Audio 2 class | :ref: `uac2_device ` | uac2_(n) |
38
+ | USB Audio 2 class | :ref: `uac2_device ` | :samp: ` uac2_{ n } ` |
39
39
+-----------------------------------+-------------------------+-------------------------+
40
- | USB CDC ACM class | :ref: `uart_api ` | cdc_acm_(n) |
40
+ | USB CDC ACM class | :ref: `uart_api ` | :samp: ` cdc_acm_{ n } ` |
41
41
+-----------------------------------+-------------------------+-------------------------+
42
- | USB CDC ECM class | Ethernet device | cdc_ecm_(n) |
42
+ | USB CDC ECM class | Ethernet device | :samp: ` cdc_ecm_{ n } ` |
43
43
+-----------------------------------+-------------------------+-------------------------+
44
- | USB Mass Storage Class (MSC) | :ref: `disk_access_api ` | msc_(n) |
44
+ | USB Mass Storage Class (MSC) | :ref: `disk_access_api ` | :samp: ` msc_{ n } ` |
45
45
+-----------------------------------+-------------------------+-------------------------+
46
- | USB Human Interface Devices (HID) | :ref: `usbd_hid_device ` | hid_(n) |
46
+ | USB Human Interface Devices (HID) | :ref: `usbd_hid_device ` | :samp: ` hid_{ n } ` |
47
47
+-----------------------------------+-------------------------+-------------------------+
48
- | Bluetooth HCI USB transport layer | :ref: `bt_hci_raw ` | bt_hci_(n) |
48
+ | Bluetooth HCI USB transport layer | :ref: `bt_hci_raw ` | :samp: ` bt_hci_{ n } ` |
49
49
+-----------------------------------+-------------------------+-------------------------+
50
50
51
51
Samples
@@ -99,6 +99,7 @@ must not be directly accessed or manipulated by the application.
99
99
100
100
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
101
101
:language: c
102
+ :dedent:
102
103
:start-after: doc device instantiation start
103
104
:end-before: doc device instantiation end
104
105
@@ -112,6 +113,7 @@ require a single instantiation of the language descriptor using the
112
113
113
114
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
114
115
:language: c
116
+ :dedent:
115
117
:start-after: doc string instantiation start
116
118
:end-before: doc string instantiation end
117
119
@@ -120,6 +122,7 @@ initializing the USB device with :c:func:`usbd_add_descriptor`.
120
122
121
123
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
122
124
:language: c
125
+ :dedent:
123
126
:start-after: doc add string descriptor start
124
127
:end-before: doc add string descriptor end
125
128
@@ -129,6 +132,7 @@ a configuration. Later, USB device functions are assigned to a configuration.
129
132
130
133
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
131
134
:language: c
135
+ :dedent:
132
136
:start-after: doc configuration instantiation start
133
137
:end-before: doc configuration instantiation end
134
138
@@ -140,6 +144,7 @@ configuration will get ``bConfigurationValue`` one, and then further upward.
140
144
141
145
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
142
146
:language: c
147
+ :dedent:
143
148
:start-after: doc configuration register start
144
149
:end-before: doc configuration register end
145
150
@@ -155,6 +160,7 @@ instances.
155
160
156
161
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
157
162
:language: c
163
+ :dedent:
158
164
:start-after: doc functions register start
159
165
:end-before: doc functions register end
160
166
@@ -173,6 +179,7 @@ steps, which should be performed prior to initializing the USB device.
173
179
174
180
.. literalinclude :: ../../../../samples/subsys/usb/common/sample_usbd_init.c
175
181
:language: c
182
+ :dedent:
176
183
:start-after: doc device init start
177
184
:end-before: doc device init end
178
185
@@ -183,5 +190,6 @@ enumerating the device. The application can disable the USB device using
183
190
184
191
.. literalinclude :: ../../../../samples/subsys/usb/hid-keyboard/src/main.c
185
192
:language: c
193
+ :dedent:
186
194
:start-after: doc device enable start
187
195
:end-before: doc device enable end
0 commit comments