1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
|
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
menuconfig USBDEV_COMPOSITE
bool "USB composite device support"
default n
---help---
Enables USB composite device support
if USBDEV_COMPOSITE
#config COMPOSITE_IAD
# bool ""
# default n
# ---help---
# If one of the members of the composite has multiple interfaces
# (such as CDC/ACM), then an Interface Association Descriptor (IAD)
# will be necessary. Default: IAD will be used automatically if
# needed. It should not be necessary to set this.
config COMPOSITE_EP0MAXPACKET
int "Max packet size for endpoint 0"
default 64
---help---
Max packet size for endpoint 0
config COMPOSITE_VENDORID
hex "Composite vendor ID"
default 0
config COMPOSITE_VENDORSTR
string "Composite vendor ID"
default "Nuttx"
---help---
The vendor ID code/string
config COMPOSITE_PRODUCTID
hex "Composite product id"
default 0
config COMPOSITE_PRODUCTSTR
string "Composite product string"
default "Composite device"
---help---
The product ID code/string
config COMPOSITE_SERIALSTR
string "Composite serial string"
default "001"
---help---
Device serial number string
config COMPOSITE_CONFIGSTR
string "Configuration string"
default "Nuttx COMPOSITE config"
---help---
Configuration string
config COMPOSITE_VERSIONNO
string "Composite version number"
default ""
---help---
Interface version number.
endif
config USBDEV_ISOCHRONOUS
bool "Enable isochronous"
default n
---help---
Build in extra support for isochronous endpoints
config USBDEV_DUALSPEED
bool "Enable high and full speed"
default n
---help---
Hardware handles high and full speed operation (USB 2.0)
choice USBDEV_POWERED
prompt "Select USB device powered"
default USBDEV_SELFPOWERED
config USBDEV_SELFPOWERED
bool "Self powerd"
---help---
Will cause USB features to indicate that the device is self-powered
config USBDEV_BUSPOWERED
bool "Bus powerd"
---help---
Will cause USB features to indicate that the device is self-powered
endchoice
config USBDEV_MAXPOWER
int "Maximum power consumption in mA"
default 100
depends on USBDEV_BUSPOWERED
---help---
Maximum power consumption in mA
config USBDEV_TRACE
bool "Enable USB tracing for debug"
default n
---help---
Enables USB tracing for debug
config USBDEV_TRACE_NRECORDS
int "Number of trace entries to remember"
default 32
depends on USBDEV_TRACE
---help---
Number of trace entries to remember
menuconfig PL2303
bool "Emulates the Prolific PL2303 serial/USB converter"
default n
---help---
This logic emulates the Prolific PL2303 serial/USB converter
if PL2303
config PL2303_EPINTIN
int "Logical endpoint numbers"
default 1
config PL2303_EPBULKOUT
int "Endpoint Bulkout"
default 2
config PL2303_EPBULKIN
int "Endpoint Bulkin"
default 3
config PL2303_EP0MAXPACKET
int "Packet and request buffer sizes"
default 64
config PL2303_NWRREQS
int "Number of read requests that can be in flight"
default 4
---help---
The number of read requests that can be in flight
config PL2303_NRDREQS
int "Number of write requests that can be in flight"
default 4
---help---
The number of write/read requests that can be in flight
config PL2303_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Size of the serial receive/transmit buffers
config PL2303_TXBUFSIZE
int "Transmit buffer size"
default 256
---help---
Size of the serial receive/transmit buffers
config PL2303_VENDORID
hex "Vendor ID"
default 0x067b
config PL2303_PRODUCTID
hex "Product ID"
default 0x2303
config PL2303_VENDORSTR
string "Vendor string"
default "NuttX"
config PL2303_PRODUCTSTR
string "Product string"
default "USBdev Serial"
endif
menuconfig CDCACM
bool "USB Modem (CDC ACM) support"
default n
---help---
Enables USB Modem (CDC ACM) support
if CDCACM
config CDCACM_COMPOSITE
bool "CDCACM composite support"
default n
depends on USBDEV_COMPOSITE
---help---
Configure the CDC serial driver as part of a composite driver
(only if CONFIG_USBDEV_COMPOSITE is also defined)
config CDCACM_IFNOBASE
int "Offset the CDC/ACM interface numbers"
default 0
depends on CDCACM_COMPOSITE
---help---
If the CDC driver is part of a composite device, then this may need to
be defined to offset the CDC/ACM interface numbers so that they are
unique and contiguous. When used with the Mass Storage driver, the
correct value for this offset is zero.
config CDCACM_STRBASE
int "Offset the CDC/ACM string numbers"
default 0
depends on CDCACM_COMPOSITE
---help---
If the CDC driver is part of a composite device, then this may need to
be defined to offset the CDC/ACM string numbers so that they are
unique and contiguous. When used with the Mass Storage driver, the
correct value for this offset is four (this value actuallly only needs
to be defined if names are provided for the Notification interface,
config CDCACM_NOTIFSTR, or the data interface, CONFIG_CDCACM_DATAIFSTR).
config CDCACM_EP0MAXPACKET
int "Endpoint 0 max packet size"
default 64
---help---
Endpoint 0 max packet size. Default 64.
config CDCACM_EPINTIN
int "Hardware endpoint that supports interrupt IN operation"
default 2
---help---
The logical 7-bit address of a hardware endpoint that supports
interrupt IN operation. Default 2.
config CDCACM_EPINTIN_FSSIZE
int "Endpoint in full speed size"
default 64
---help---
Max package size for the interrupt IN endpoint if full speed mode.
Default 64.
config CDCACM_EPINTIN_HSSIZE
int "Endpoint in high speed size"
default 64
---help---
Max package size for the interrupt IN endpoint if high speed mode.
Default 64.
config CDCACM_EPBULKOUT
int "Endpoint bulk out"
default 0
---help---
The logical 7-bit address of a hardware endpoint that supports
bulk OUT operation
config CDCACM_EPBULKOUT_FSSIZE
int "Endpoint bulk out full speed size"
default 64
---help---
Max package size for the bulk OUT endpoint if full speed mode.
Default 64.
config CDCACM_EPBULKOUT_HSSIZE
int "Endpoint bulk out high speed size"
default 512
---help---
Max package size for the bulk OUT endpoint if high speed mode.
Default 512.
config CDCACM_EPBULKIN
int "Endpoint bulk in"
default 0
---help---
The logical 7-bit address of a hardware endpoint that supports
bulk IN operation
config CDCACM_EPBULKIN_FSSIZE
int "Endpoint bulk in full speed size"
default 64
---help---
Max package size for the bulk IN endpoint if full speed mode.
Default 64.
config CDCACM_EPBULKIN_HSSIZE
int "Endpoint bulk in high speed size"
default 512
---help---
Max package size for the bulk IN endpoint if high speed mode.
Default 512.
config CDCACM_NWRREQS
int "Number of read requests that can be in flight"
default 4
---help---
The number of read requests that can be in flight
config CDCACM_NRDREQS
int "Number of write requests that can be in flight"
default 4
---help---
The number of write/read requests that can be in flight
config CDCACM_RXBUFSIZE
int "Receive buffer size"
default 256
---help---
Size of the serial receive/transmit buffers
config CDCACM_TXBUFSIZE
bool "Transmit buffer size"
default 256
---help---
Size of the serial receive/transmit buffers
config CDCACM_VENDORID
hex "Vendor ID"
default 0x0525
---help---
The vendor ID code/string. Default 0x0525 and "NuttX"
0x0525 is the Netchip vendor and should not be used in any
products. This default VID was selected for compatibility with
the Linux CDC ACM default VID.
config CDCACM_PRODUCTID
hex "Product ID"
default 0xa4a7
---help---
The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
0xa4a7 was selected for compatibility with the Linux CDC ACM
default PID.
config CDCACM_VENDORSTR
string "Vendor string"
default "NuttX"
config CDCACM_PRODUCTSTR
string "Product string"
default "USBdev Serial"
endif
menuconfig USBMSC
bool "USB Mass storage class device"
default n
---help---
References:
"Universal Serial Bus Mass Storage Class, Specification Overview,"
Revision 1.2, USB Implementer's Forum, June 23, 2003.
"Universal Serial Bus Mass Storage Class, Bulk-Only Transport,"
Revision 1.0, USB Implementer's Forum, September 31, 1999.
"SCSI Primary Commands - 3 (SPC-3)," American National Standard
for Information Technology, May 4, 2005
"SCSI Primary Commands - 4 (SPC-4)," American National Standard
for Information Technology, July 19, 2008
"SCSI Block Commands -2 (SBC-2)," American National Standard
for Information Technology, November 13, 2004
"SCSI Multimedia Commands - 3 (MMC-3)," American National Standard
for Information Technology, November 12, 2001
if USBMSC
config USBMSC_COMPOSITE
bool "Mass storage composite support"
default n
depends on USBDEV_COMPOSITE
---help---
Configure the mass storage driver as part of a composite driver
(only if CONFIG_USBDEV_COMPOSITE is also defined)
config USBMSC_IFNOBASE
int "Offset the mass storage interface number"
default 2
depends on USBMSC_COMPOSITE
---help---
If the CDC driver is part of a composite device, then this may need to
be defined to offset the mass storage interface number so that it is
unique and contiguous. When used with the CDC/ACM driver, the
correct value for this offset is two (because of the two CDC/ACM
interfaces that will precede it).
config USBMSC_STRBASE
int "Offset the mass storage string numbers"
default 2
depends on USBMSC_COMPOSITE
---help---
If the CDC driver is part of a composite device, then this may need to
be defined to offset the mass storage string numbers so that they are
unique and contiguous. When used with the CDC/ACM driver, the
correct value for this offset is four (or perhaps 5 or 6, depending
on if CONFIG_CDCACM_NOTIFSTR or CONFIG_CDCACM_DATAIFSTR are defined).
config USBMSC_EP0MAXPACKET
int "Max packet size for endpoint 0"
default 64
---help---
Max packet size for endpoint 0
config USBMSC_EPBULKOUT
int "Endpoint bulk out"
default 0
---help---
The logical 7-bit address of a hardware endpoints that support
bulk OUT and IN operations
config USBMSC_EPBULKIN
int "Endpoint bulk in"
default 0
---help---
The logical 7-bit address of a hardware endpoints that support
bulk OUT and IN operations
config USBMSC_NWRREQS
int "The number of write requests that can be in flight"
default 4
---help---
The number of write/read requests that can be in flight
config USBMSC_NRDREQS
int "The number of read requests that can be in flight"
default 4
---help---
The number of write/read requests that can be in flight
config USBMSC_BULKINREQLEN
int "Bulk in request size"
default 512
config USBMSC_BULKOUTREQLEN
int "Bulk out request size"
default 512
---help---
The size of the buffer in each write/read request. This
value needs to be at least as large as the endpoint
maxpacket and ideally as large as a block device sector.
config USBMSC_VENDORID
hex "Mass stroage Vendor ID"
default 0x00
config USBMSC_VENDORSTR
string "Mass stroage vendor string"
default "Nuttx"
---help---
The vendor ID code/string
config USBMSC_PRODUCTID
hex "Mass stroage Product ID"
default 0x00
config USBMSC_PRODUCTSTR
string "Mass stroage product string"
default "Mass stroage"
config USBMSC_VERSIONNO
hex "USB MSC Version Number"
default "0x399"
config USBMSC_REMOVABLE
bool "Mass stroage remove able"
default n
---help---
Select if the media is removable
USB Composite Device Configuration
endif
|