Kconfig 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see the file kconfig-language.txt in the NuttX tools repository.
  4. #
  5. config USBHOST_NPREALLOC
  6. int "Number of pre-allocated class instances"
  7. default 4
  8. ---help---
  9. Number of pre-allocated class instances
  10. config USBHOST_BULK_DISABLE
  11. bool "Disable bulk endpoint support"
  12. default n
  13. ---help---
  14. On some architectures, selecting this setting will reduce driver size
  15. by disabling bulk endpoint support
  16. config USBHOST_INT_DISABLE
  17. bool "Disable interrupt endpoint support"
  18. default n
  19. ---help---
  20. On some architectures, selecting this setting will reduce driver size
  21. by disabling interrupt endpoint support
  22. config USBHOST_ISOC_DISABLE
  23. bool "Disable isochronous endpoint support"
  24. default n
  25. ---help---
  26. On some architectures, selecting this setting will reduce driver size
  27. by disabling isochronous endpoint support
  28. config USBHOST_HAVE_ASYNCH
  29. bool
  30. default n
  31. config USBHOST_ASYNCH
  32. bool "Asynchronous transfer support"
  33. default n
  34. depends on USBHOST_HAVE_ASYNCH
  35. ---help---
  36. Select if the host controller driver needs to support asynchronous
  37. I/O transfer. This may be required, for example, to receive
  38. infrequent, asynchronous input from an interrupt pipe.
  39. config USBHOST_HUB
  40. bool "USB Hub Support"
  41. default n
  42. depends on USBHOST_HAVE_ASYNCH && !USBHOST_INT_DISABLE
  43. select USBHOST_ASYNCH
  44. ---help---
  45. Select this option to build in support for USB hubs.
  46. if USBHOST_HUB
  47. config USBHOST_HUB_POLLMSEC
  48. int "USB Hub Polling Interval (MSec)"
  49. default 400
  50. ---help---
  51. On higher end host controllers (OHCI and EHCI), the asynchronous,
  52. interrupt IN transfers will pend until data is available from the
  53. hub. On lower end host controllers (like STM32 and EFM32), the
  54. transfer will fail immediately when the device NAKs the first
  55. attempted interrupt IN transfer (with result == EGAIN) and the hub
  56. class driver will fall back to polling the hub.
  57. For the case of the higher end controllers, this polling interval
  58. is not critical since it would really only be used in the event of
  59. failures to communicate with the hub.
  60. But for the lower end host controllers, the asynchronous transfers
  61. are ineffective and this polling interval becomes a critical
  62. parameter that must be tuned to tradeoff CPU usage with
  63. responsiveness to hub-related events (It would, I suppose, be more
  64. efficient to use synchronous transfers with these lower end host
  65. controllers).
  66. endif # USBHOST_HUB
  67. config USBHOST_COMPOSITE
  68. bool "Composite device support"
  69. default n
  70. ---help---
  71. Build in USB host support for connected composite devices
  72. config USBHOST_COMPOSITE_STRICT
  73. bool "Strict composite membership"
  74. default n
  75. depends on USBHOST_COMPOSITE
  76. ---help---
  77. If selected, then the composite device will not be enumerated unless
  78. every member class in the composite is supported. If not selected
  79. then, for example, you could use the CDC/ACM interface of the device
  80. with no support for the other interfaces.
  81. config USBHOST_MSC
  82. bool "Mass Storage Class Support"
  83. default n
  84. depends on !BULK_DISABLE
  85. ---help---
  86. Enable support for the mass storage class driver. This also depends on
  87. NFILE_DESCRIPTORS > 0 && SCHED_WORKQUEUE=y
  88. config USBHOST_CDCACM
  89. bool "CDC/ACM support"
  90. default n
  91. depends on USBHOST_HAVE_ASYNCH && !USBHOST_BULK_DISABLE && !USBHOST_INT_DISABLE
  92. select USBHOST_ASYNCH
  93. select SERIAL_REMOVABLE
  94. ---help---
  95. Select this option to build in host support for CDC/ACM serial
  96. devices.
  97. if USBHOST_CDCACM
  98. choice
  99. prompt "CDC/ACM Protocol"
  100. default USBHOST_CDCACM_COMPLIANT if SERIAL_OFLOWCONTROL && !USBHOST_INT_DISABLE
  101. default USBHOST_CDCACM_REDUCED if !SERIAL_OFLOWCONTROL || USBHOST_INT_DISABLE
  102. config USBHOST_CDCACM_COMPLIANT
  103. bool "CDC/ACM compliant"
  104. depends on SERIAL_OFLOWCONTROL && !USBHOST_INT_DISABLE
  105. ---help---
  106. The device needs to implement the Abstract Control Model (ACM)
  107. subclass defined in the USB Communication Device Class (CDC)
  108. specification. This protocol requires two USB interfaces, a data
  109. interface which consists of two endpoints (bulk in + bulk out) and a
  110. control interface which consists of one interrupt in endpoint.
  111. Furthermore, on EP0 the device must implement the class-specific
  112. requests defined by the CDC specification. Because this USB protocol
  113. is compliant to the CDC/ACM standard on some other operating systems
  114. (e.g. Linux, MacOS) the device can work with in-box drivers.
  115. config USBHOST_CDCACM_REDUCED
  116. bool "CDC/ACM reduced"
  117. ---help---
  118. This mode uses the CDC data interface (bulk in + bulk out endpoint)
  119. only. No control interface (interrupt in endpoint) is required. The
  120. device needs to implement the CDC class-specific requests, so that
  121. is still possible to support baud rate settings and serial control/
  122. status lines. This mode is useful if the number of available
  123. endpoints is limited by hardware restrictions.
  124. If the CDC/ACM compliant protocol is selected, then the reduced
  125. protocol is supported for devices that provide not interrupt IN
  126. endpoint. This option is then most useful for testing purposes or
  127. if there are insufficient resources to support the compliant
  128. protocol. The interrupt IN control interface will not be used even
  129. if it is available in this case.
  130. config USBHOST_CDCACM_BULKONLY
  131. bool "Bulk only protocol"
  132. ---help---
  133. The device implements only the data interface (bulk in + bulk out
  134. endpoint). The device does not provide an additional control
  135. interface and does not need to implement any class-specific requests
  136. on EP0. Because bulk transfer mode provides flow control, there is
  137. no need to support serial control/status lines. The advantage of
  138. the bulk-only protocol is that the implementation efforts on the
  139. device side are reduced to a minimum.
  140. By default, both the CDC/ACM compliant protocol and the reduced
  141. protocol are supported. This option is then most useful for testing
  142. purposes. The interrupt IN control interface will not be used even
  143. if it is available; nor will EP0 class requestes.
  144. endchoice # CDC/ACM Protocol
  145. config USBHOST_CDCACM_NTDELAY
  146. int "CDC/ACM notification polling interval (MSec)"
  147. default 400
  148. depends on USBHOST_CDCACM_COMPLIANT
  149. ---help---
  150. On higher end host controllers (OHCI and EHCI), the asynchronous,
  151. interrupt IN transfers will pend until data is available from the
  152. hub. On lower end host controllers (like STM32 and EFM32), the
  153. transfer will fail immediately when the device NAKs the first
  154. attempted interrupt IN transfer (with result == EGAIN) and the hub
  155. class driver will fall back to polling the hub.
  156. For the case of the higher end controllers, this polling interval
  157. is not critical since it would really only be used in the event of
  158. failures to communicate with the hub.
  159. But for the lower end host controllers, the asynchronous transfers
  160. are ineffective and this polling interval becomes a critical
  161. parameter that must be tuned to tradeoff CPU usage with
  162. responsiveness to hub-related events (It would, I suppose, be more
  163. efficient to use synchronous transfers with these lower end host
  164. controllers).
  165. config USBHOST_CDCACM_RXDELAY
  166. int "RX poll delay (MSec)"
  167. default 200
  168. ---help---
  169. When the CDC/ACM device is inactive, the host must poll it at this
  170. rate in order to discover if it has serial data to send to us.
  171. config USBHOST_CDCACM_TXDELAY
  172. int "TX poll delay (MSec)"
  173. default 200
  174. ---help---
  175. When the appellation is inactive, the host must poll it at this
  176. rate in order to discover if it has serial data to send to to the
  177. device.
  178. config USBHOST_CDCACM_NPREALLOC
  179. int "Preallocated state"
  180. default 0
  181. ---help---
  182. If this setting is zero, the CDC/ACM class driver will allocate
  183. memory as needed for CDC/ACM device state. If this value is non-
  184. zero, then it provides a number of preallocated CDC/ACM state
  185. structures. This increases the static size of the code image, but
  186. eliminates all, direct, run-time allocations by the driver.
  187. config USBHOST_CDCACM_BAUD
  188. int "Initialize CDC/ACM BAUD"
  189. default 115200
  190. config USBHOST_CDCACM_PARITY
  191. int "Initialize CDC/ACM parity"
  192. default 0
  193. range 0 2
  194. ---help---
  195. Initialize CDC/ACM parity. 0=None, 1=Odd, 2=Even. Default: None
  196. config USBHOST_CDCACM_BITS
  197. int "Initialize CDC/ACM number of bits"
  198. default 8
  199. ---help---
  200. Initialize CDC/ACM number of bits. Default: 8
  201. config USBHOST_CDCACM_2STOP
  202. int "Initialize CDC/ACM two stop bits"
  203. default 0
  204. ---help---
  205. 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
  206. config USBHOST_CDCACM_RXBUFSIZE
  207. int "Serial RX buffer size"
  208. default 128
  209. ---help---
  210. This is the size of the serial buffer that will be used to hold
  211. received data.
  212. config USBHOST_CDCACM_TXBUFSIZE
  213. int "Serial TX buffer size"
  214. default 128
  215. ---help---
  216. This is the size of the serial buffer that will be used to hold
  217. data waiting for tranmission.
  218. endif # USBHOST_CDCACM
  219. config USBHOST_HIDKBD
  220. bool "HID Keyboard Class Support"
  221. default n
  222. depends on !INT_DISABLE
  223. ---help---
  224. Enable support for the keyboard class driver. This also depends on
  225. SCHED_WORKQUEUE && !DISABLE_SIGNALS
  226. if USBHOST_HIDKBD
  227. config HIDKBD_POLLUSEC
  228. int "Keyboard Poll Rate (MSEC)"
  229. default 100000
  230. ---help---
  231. Device poll rate in microseconds. Default: 100,000 microseconds.
  232. config HIDKBD_DEFPRIO
  233. int "Polling Thread Priority"
  234. default 50
  235. ---help---
  236. Priority of the polling thread. Default: 50.
  237. config HIDKBD_STACKSIZE
  238. int "Polling thread stack size"
  239. default 1024
  240. ---help---
  241. Stack size for polling thread. Default: 1024
  242. config HIDKBD_BUFSIZE
  243. int "Scancode Buffer Size"
  244. default 64
  245. ---help---
  246. Scancode buffer size. Default: 64.
  247. config HIDKBD_NPOLLWAITERS
  248. int "Max Number of Waiters for Poll Event"
  249. default 2
  250. depends on !DISABLE_POLL
  251. ---help---
  252. If the poll() method is enabled, this defines the maximum number
  253. of threads that can be waiting for keyboard events. Default: 2.
  254. config HIDKBD_RAWSCANCODES
  255. bool "Use Raw Scan Codes"
  256. default n
  257. ---help---
  258. If set to y no conversions will be made on the raw keyboard scan
  259. codes. This option is useful during testing. Default: ASCII conversion.
  260. config HIDKBD_ENCODED
  261. bool "Encode Special Keys"
  262. default n
  263. depends on !HIDKBD_RAWSCANCODES && LIB_KBDCODEC
  264. ---help---
  265. Encode special key press events in the user buffer. In this case,
  266. the user end must decode the encoded special key values using the
  267. interfaces defined in include/nuttx/input/kbd_codec.h. These
  268. special keys include such things as up/down arrows, home and end
  269. keys, etc. If this not defined, only 7-bit print-able and control
  270. ASCII characters will be provided to the user.
  271. config HIDKBD_ALLSCANCODES
  272. bool "Use All Scancodes"
  273. default n
  274. ---help---
  275. If set to y all 231 possible scancodes will be converted to
  276. something. Default: 104 key US keyboard.
  277. config HIDKBD_NODEBOUNCE
  278. bool "Disable Debounce"
  279. default n
  280. ---help---
  281. If set to y normal debouncing is disabled. Default:
  282. Debounce enabled (No repeat keys).
  283. endif
  284. config USBHOST_HIDMOUSE
  285. bool "HID Mouse Class Support"
  286. default n
  287. depends on !INT_DISABLE
  288. select INPUT
  289. select MOUSE
  290. ---help---
  291. Enable support for the mouse class driver. This also depends on
  292. SCHED_WORKQUEUE && !DISABLE_SIGNALS
  293. NOTE: This driver checks out on a Labtec and an AOpen mouse, but
  294. does not work correctly on a Microsoft mouse. A little more work
  295. would be needed to support the Microsoft mouse.
  296. if USBHOST_HIDMOUSE
  297. config HIDMOUSE_TSCIF
  298. bool "Touchscreen Emulation"
  299. default n
  300. ---help---
  301. Normally, the HID mouse driver uses the mouse report structure
  302. defined in include/nuttx/input/mouse.h. The mouse driver can,
  303. however, be configured to use the touchscreen interface defined in
  304. include/nuttx/input/touchcreen.h. If the touch screen interface is
  305. used, only support for the left button will be provided.
  306. NOTE: Unlike touchscreen drivers, mouse drivers will report
  307. position data even when the "pen is up", i.e., when no buttons are
  308. pressed. This behavior is necessary to provide the positional data
  309. would would be needed to drive a cursor. Without a cursor of some
  310. kind, the mouse is not very useful. So this option may not be useful.
  311. config HIDMOUSE_DEFPRIO
  312. int "Polling Thread Priority"
  313. default 50
  314. ---help---
  315. Priority of the polling thread. Default: 50.
  316. config HIDMOUSE_STACKSIZE
  317. int "Polling thread stack size"
  318. default 1024
  319. ---help---
  320. Stack size for polling thread. Default: 1024
  321. config HIDMOUSE_BUFSIZE
  322. int "Scancode Buffer Size"
  323. default 64
  324. ---help---
  325. Scancode buffer size. Default: 64.
  326. config HIDMOUSE_NPOLLWAITERS
  327. int "Max Number of Waiters for Poll Event"
  328. default 2
  329. depends on !DISABLE_POLL
  330. ---help---
  331. If the poll() method is enabled, this defines the maximum number
  332. of threads that can be waiting for mouse events. Default: 2.
  333. config HIDMOUSE_SWAPXY
  334. bool "Swap X/Y"
  335. default n
  336. ---help---
  337. Reverse the meaning of X and Y to handle different display orientations.
  338. NOTE: All of the following settings apply AFTER X and Y have been swapped.
  339. config HIDMOUSE_XMAX
  340. int "Maximum X position"
  341. default 320
  342. range 0 32767
  343. ---help---
  344. This is the maximum value of the X position that will be reported.
  345. Default: 320
  346. config HIDMOUSE_YMAX
  347. int "Maximum Y position"
  348. default 240
  349. range 0 32767
  350. ---help---
  351. This is the maximum value of the Y position that will be reported.
  352. Default: 240
  353. config HIDMOUSE_XSCALE
  354. hex "X scaling factor"
  355. default 0x00010000
  356. ---help---
  357. Mouse positions are accumulated from X/Y displacements reported by
  358. the mouse device. This setting provides a scaling value for the X
  359. displacement. This is a fixed precision floating point number with
  360. 16 bits of fraction. So a value of 0x00010000 is 1.0, 0x00018000
  361. is 1.5, 0x00024000 is 2.25, etc.
  362. NOTE that a negative value of HIDMOUSE_XSCALE such as 0xffff0000
  363. (-1.0) can be used to change the direction of movement.
  364. Default: 0x00010000 (1.0)
  365. config HIDMOUSE_YSCALE
  366. hex "Y scaling factor"
  367. default 0x00010000
  368. ---help---
  369. Mouse positions are accumulated from X/Y displacements reported by
  370. the mouse device. This setting provides a scaling value for the Y
  371. displacement. This is a fixed precision floating point number with
  372. 16 bits of fraction. So a value of 0x00010000 is 1.0, 0x00018000
  373. is 1.5, 0x00024000 is 2.25, etc.
  374. NOTE that a negative value of HIDMOUSE_YSCALE such as 0xffff0000
  375. (-1.0) can be used to change the direction of movement.
  376. Default: 0x00010000 (1.0)
  377. config HIDMOUSE_XTHRESH
  378. int "X threshold"
  379. default 12
  380. ---help---
  381. New mouse positions will only be reported when the X or Y data changes by these
  382. thresholds. This tradeoff reduces data rate for some loss in dragging accuracy.
  383. Both X and Y axis thresholding can be disabled by setting this value to zero.
  384. Default: 12
  385. config HIDMOUSE_THRESHY
  386. int "Y threshold"
  387. default 12
  388. ---help---
  389. New touch positions will only be reported when the X or Y data changes by these
  390. thresholds. This tradeoff reduces data rate for some loss in dragging accuracy.
  391. Both X and Y axis thresholding can be disabled by setting this value to zero.
  392. Default: 12
  393. if MOUSE_WHEEL
  394. config HIDMOUSE_WMAX
  395. int "Maximum wheel position"
  396. default 320
  397. range 0 32767
  398. ---help---
  399. This is the maximum value of the wheel position that will be
  400. reported. Default: 320
  401. config HIDMOUSE_WSCALE
  402. hex "Wheel scaling factor"
  403. default 0x00010000
  404. ---help---
  405. Mouse wheel position are accumulated from wheel displacements
  406. reported by the mouse device. This setting provides a scaling
  407. value for the wheel displacement. This is a fixed precision
  408. floating point number with 16 bits of fraction. So a value of
  409. 0x00010000 is 1.0, 0x00018000 is 1.5, 0x00024000 is 2.25, etc.
  410. NOTE that a negative value of HIDMOUSE_XSCALE such as 0xffff0000
  411. (-1.0) can be used to change the direction of wheel output.
  412. Default: 0x00010000 (1.0)
  413. config HIDMOUSE_WTHRESH
  414. int "Wheel threshold"
  415. default 1
  416. ---help---
  417. New wheel positions will only be reported when the wheel position
  418. changes by these thresholds. This tradeoff reduces data rate for some
  419. loss in wheel responsiveness.
  420. Default: 1
  421. endif # MOUSE_WHEEL
  422. endif # USBHOST_HIDMOUSE
  423. config USBHOST_RTL8187
  424. bool "RTL8187-based wireless LAN"
  425. default n
  426. depends on NET
  427. if USBHOST_RTL8187
  428. config RTL8187B
  429. bool "RTL8187B chip"
  430. default y
  431. config RTL8187_VID
  432. hex "RTL8187 VID"
  433. default 0x0bda
  434. config RTL8187_PID
  435. hex "RTL8187 PID"
  436. default 0x8189
  437. endif # USBHOST_RTL8187
  438. config USBHOST_XBOXCONTROLLER
  439. bool "Xbox Controller Support"
  440. default n
  441. depends on !INT_DISABLE
  442. select INPUT
  443. ---help---
  444. Enable support for the Xbox Controller driver.
  445. if USBHOST_XBOXCONTROLLER
  446. config XBOXCONTROLLER_DEFPRIO
  447. int "Polling Thread Priority"
  448. default 50
  449. ---help---
  450. Priority of the polling thread. Default: 50.
  451. config XBOXCONTROLLER_STACKSIZE
  452. int "Polling thread stack size"
  453. default 1024
  454. ---help---
  455. Stack size for polling thread. Default: 1024
  456. config XBOXCONTROLLER_NPOLLWAITERS
  457. int "Max Number of Waiters for Poll Event"
  458. default 2
  459. depends on !DISABLE_POLL
  460. ---help---
  461. If the poll() method is enabled, this defines the maximum number
  462. of threads that can be waiting for mouse events. Default: 2.
  463. endif # USBHOST_XBOXCONTROLLER
  464. config USBHOST_TRACE
  465. bool "Enable USB HCD tracing for debug"
  466. default n
  467. select HAVE_USBTRACE
  468. ---help---
  469. Enables USB tracing for debug. Only supported for the HCD and,
  470. further, no supported by all HCD implementations.
  471. if USBHOST_TRACE
  472. config USBHOST_TRACE_NRECORDS
  473. int "Number of trace entries to remember"
  474. default 128
  475. ---help---
  476. Number of trace entries to remember.
  477. config USBHOST_TRACE_VERBOSE
  478. bool "Enable verbose debug trace"
  479. default n
  480. ---help---
  481. Enable verbose trace output if supported by the platform. The
  482. intent is that if USBHOST_TRACE_VERBOSE is not defined, then only
  483. errors, warnings, and critical messages would be logged. If
  484. USBHOST_TRACE_VERBOSE is defined, then general informative trace
  485. information would also be included.
  486. endif