Kconfig 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. menu "Using USB legacy version"
  2. config RT_USING_USB
  3. bool
  4. default n
  5. config RT_USING_USB_HOST
  6. bool "Using USB host"
  7. default n
  8. select RT_USING_USB
  9. if RT_USING_USB_HOST
  10. config RT_USBH_MSTORAGE
  11. bool "Enable Udisk Drivers"
  12. default n
  13. if RT_USBH_MSTORAGE
  14. config UDISK_MOUNTPOINT
  15. string "Udisk mount dir"
  16. default "/"
  17. endif
  18. config RT_USBH_HID
  19. bool "Enable HID Drivers"
  20. default n
  21. if RT_USBH_HID
  22. config RT_USBH_HID_MOUSE
  23. bool "Enable HID mouse protocol"
  24. default n
  25. config RT_USBH_HID_KEYBOARD
  26. bool "Enable HID keyboard protocol"
  27. default n
  28. endif
  29. endif
  30. config RT_USING_USB_DEVICE
  31. bool "Using USB device"
  32. default n
  33. select RT_USING_USB
  34. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  35. config RT_USBD_THREAD_STACK_SZ
  36. int "usb thread stack size"
  37. default 4096
  38. endif
  39. if RT_USING_USB_DEVICE
  40. config USB_VENDOR_ID
  41. hex "USB Vendor ID"
  42. default 0x0FFE
  43. config USB_PRODUCT_ID
  44. hex "USB Product ID"
  45. default 0x0001
  46. config RT_USB_DEVICE_COMPOSITE
  47. bool "Enable composite device"
  48. default n
  49. choice
  50. prompt "Device type"
  51. default _RT_USB_DEVICE_NONE
  52. depends on !RT_USB_DEVICE_COMPOSITE
  53. config _RT_USB_DEVICE_NONE
  54. bool "Using custom class by register interface"
  55. select RT_USB_DEVICE_NONE
  56. config _RT_USB_DEVICE_CDC
  57. bool "Enable to use device as CDC device"
  58. select RT_USB_DEVICE_CDC
  59. config _RT_USB_DEVICE_MSTORAGE
  60. bool "Enable to use device as Mass Storage device"
  61. select RT_USB_DEVICE_MSTORAGE
  62. config _RT_USB_DEVICE_HID
  63. bool "Enable to use device as HID device"
  64. select RT_USB_DEVICE_HID
  65. config _RT_USB_DEVICE_RNDIS
  66. bool "Enable to use device as rndis device"
  67. select RT_USB_DEVICE_RNDIS
  68. depends on RT_USING_LWIP
  69. config _RT_USB_DEVICE_ECM
  70. bool "Enable to use device as ecm device"
  71. select RT_USB_DEVICE_ECM
  72. depends on RT_USING_LWIP
  73. config _RT_USB_DEVICE_WINUSB
  74. bool "Enable to use device as winusb device"
  75. select RT_USB_DEVICE_WINUSB
  76. config _RT_USB_DEVICE_AUDIO
  77. bool "Enable to use device as audio device"
  78. select RT_USB_DEVICE_AUDIO
  79. endchoice
  80. if RT_USB_DEVICE_COMPOSITE
  81. config RT_USB_DEVICE_CDC
  82. bool "Enable to use device as CDC device"
  83. default n
  84. config RT_USB_DEVICE_NONE
  85. bool
  86. default y
  87. config RT_USB_DEVICE_MSTORAGE
  88. bool "Enable to use device as Mass Storage device"
  89. default n
  90. config RT_USB_DEVICE_HID
  91. bool "Enable to use device as HID device"
  92. default n
  93. config RT_USB_DEVICE_RNDIS
  94. bool "Enable to use device as rndis device"
  95. default n
  96. depends on RT_USING_LWIP
  97. config RT_USB_DEVICE_ECM
  98. bool "Enable to use device as ecm device"
  99. default n
  100. depends on RT_USING_LWIP
  101. config RT_USB_DEVICE_WINUSB
  102. bool "Enable to use device as winusb device"
  103. default n
  104. config RT_USB_DEVICE_AUDIO
  105. bool "Enable to use device as audio device"
  106. default n
  107. endif
  108. if RT_USB_DEVICE_CDC
  109. config RT_VCOM_TASK_STK_SIZE
  110. int "virtual com thread stack size"
  111. default 512
  112. config RT_CDC_RX_BUFSIZE
  113. int "virtual com rx buffer size"
  114. default 128
  115. config RT_VCOM_TX_USE_DMA
  116. bool "Enable to use dma for vcom tx"
  117. default n
  118. config RT_VCOM_SERNO
  119. string "serial number of virtual com"
  120. default "32021919830108"
  121. config RT_VCOM_SER_LEN
  122. int "serial number length of virtual com"
  123. default 14
  124. config RT_VCOM_TX_TIMEOUT
  125. int "tx timeout(ticks) of virtual com"
  126. default 1000
  127. endif
  128. if RT_USB_DEVICE_WINUSB
  129. config RT_WINUSB_GUID
  130. string "Guid for winusb"
  131. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  132. endif
  133. if RT_USB_DEVICE_MSTORAGE
  134. config RT_USB_MSTORAGE_DISK_NAME
  135. string "msc class disk name"
  136. default "flash0"
  137. endif
  138. if RT_USB_DEVICE_RNDIS
  139. config RNDIS_DELAY_LINK_UP
  140. bool "Delay linkup media connection"
  141. select RT_USING_TIMER_SOFT
  142. default n
  143. endif
  144. if RT_USB_DEVICE_HID
  145. config RT_USB_DEVICE_HID_KEYBOARD
  146. bool "Use to HID device as Keyboard"
  147. default n
  148. if RT_USB_DEVICE_HID_KEYBOARD
  149. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  150. int "Number of Keyboard(max 3)"
  151. default 1
  152. range 1 3
  153. endif
  154. config RT_USB_DEVICE_HID_MOUSE
  155. bool "Use to HID device as Mouse"
  156. default n
  157. config RT_USB_DEVICE_HID_GENERAL
  158. bool "Use to HID device as General HID device"
  159. default y
  160. if RT_USB_DEVICE_HID_GENERAL
  161. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  162. int "General HID device out report length"
  163. default 63
  164. range 0 63
  165. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  166. int "General HID device in report length"
  167. default 63
  168. range 0 63
  169. endif
  170. config RT_USB_DEVICE_HID_MEDIA
  171. bool "Use to HID device as media keyboard"
  172. default y
  173. endif
  174. if RT_USB_DEVICE_AUDIO
  175. config RT_USB_DEVICE_AUDIO_MIC
  176. bool "Use usb mic device as audio device"
  177. default n
  178. if RT_USB_DEVICE_AUDIO_MIC
  179. config RT_USBD_MIC_DEVICE_NAME
  180. string "audio mic device name"
  181. default "mic0"
  182. endif
  183. config RT_USB_DEVICE_AUDIO_SPEAKER
  184. bool "Use usb speaker device as audio device"
  185. default n
  186. if RT_USB_DEVICE_AUDIO_SPEAKER
  187. config RT_USBD_SPEAKER_DEVICE_NAME
  188. string "audio speaker device name"
  189. default "sound0"
  190. endif
  191. endif
  192. endif
  193. endmenu