Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. # Kconfig file for CherryUSB
  2. menuconfig CHERRYUSB
  3. bool "CherryUSB Configuration"
  4. default n
  5. if CHERRYUSB
  6. menuconfig CHERRYUSB_DEVICE
  7. bool "Enable usb device mode"
  8. default n
  9. if CHERRYUSB_DEVICE
  10. choice
  11. prompt "Select usb device speed"
  12. default CHERRYUSB_DEVICE_SPEED_FS
  13. config CHERRYUSB_DEVICE_SPEED_FS
  14. bool "FS"
  15. config CHERRYUSB_DEVICE_SPEED_HS
  16. bool "HS"
  17. config CHERRYUSB_DEVICE_SPEED_AUTO
  18. bool "AUTO"
  19. endchoice
  20. choice
  21. prompt "Select usb device ip, and some ip need config in usb_config.h, please check"
  22. default CHERRYUSB_DEVICE_CUSTOM
  23. config CHERRYUSB_DEVICE_CUSTOM
  24. bool "CUSTOM (Implement it yourself)"
  25. config CHERRYUSB_DEVICE_FSDEV_ST
  26. bool "fsdev_st"
  27. config CHERRYUSB_DEVICE_FSDEV_CUSTOM
  28. bool "fsdev_custom"
  29. config CHERRYUSB_DEVICE_DWC2_ST
  30. bool "dwc2_st"
  31. config CHERRYUSB_DEVICE_DWC2_ESP
  32. bool "dwc2_esp"
  33. config CHERRYUSB_DEVICE_DWC2_KENDRYTE
  34. bool "dwc2_kendryte"
  35. config CHERRYUSB_DEVICE_DWC2_AT
  36. bool "dwc2_at"
  37. config CHERRYUSB_DEVICE_DWC2_HC
  38. bool "dwc2_hc"
  39. config CHERRYUSB_DEVICE_DWC2_NATION
  40. bool "dwc2_nation"
  41. config CHERRYUSB_DEVICE_DWC2_GD
  42. bool "dwc2_gd"
  43. config CHERRYUSB_DEVICE_DWC2_CUSTOM
  44. bool "dwc2_custom"
  45. config CHERRYUSB_DEVICE_MUSB_ES
  46. bool "musb_es"
  47. config CHERRYUSB_DEVICE_MUSB_SUNXI
  48. bool "musb_sunxi"
  49. config CHERRYUSB_DEVICE_MUSB_BK
  50. bool "musb_bk"
  51. config CHERRYUSB_DEVICE_MUSB_SIFLI
  52. bool "musb_sifli"
  53. config CHERRYUSB_DEVICE_MUSB_CUSTOM
  54. bool "musb_custom"
  55. config CHERRYUSB_DEVICE_CHIPIDEA_MCX
  56. bool "chipidea_mcx"
  57. config CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM
  58. bool "chipidea_custom"
  59. config CHERRYUSB_DEVICE_KINETIS_MCX
  60. bool "kinetis_mcx"
  61. config CHERRYUSB_DEVICE_KINETIS_MM32
  62. bool "kinetis_mm32"
  63. config CHERRYUSB_DEVICE_KINETIS_CUSTOM
  64. bool "kinetis_custom"
  65. config CHERRYUSB_DEVICE_BL
  66. bool "bouffalo"
  67. config CHERRYUSB_DEVICE_HPM
  68. bool "hpm"
  69. config CHERRYUSB_DEVICE_AIC
  70. bool "aic"
  71. config CHERRYUSB_DEVICE_RP2040
  72. bool "rp2040"
  73. config CHERRYUSB_DEVICE_CH32
  74. bool "ch32"
  75. config CHERRYUSB_DEVICE_PUSB2
  76. bool "pusb2"
  77. endchoice
  78. config CHERRYUSB_DEVICE_CDC_ACM
  79. bool
  80. prompt "Enable usb cdc acm device"
  81. default n
  82. config CHERRYUSB_DEVICE_HID
  83. bool
  84. prompt "Enable usb hid device"
  85. default n
  86. config CHERRYUSB_DEVICE_MSC
  87. bool
  88. prompt "Enable usb msc device"
  89. default n
  90. config CHERRYUSB_DEVICE_AUDIO
  91. bool
  92. prompt "Enable usb audio device"
  93. default n
  94. config CHERRYUSB_DEVICE_VIDEO
  95. bool
  96. prompt "Enable usb video device"
  97. default n
  98. config CHERRYUSB_DEVICE_CDC_RNDIS
  99. bool
  100. prompt "Enable usb cdc rndis device"
  101. default n
  102. config CHERRYUSB_DEVICE_CDC_ECM
  103. bool
  104. prompt "Enable usb cdc ecm device"
  105. default n
  106. config CHERRYUSB_DEVICE_CDC_NCM
  107. bool
  108. prompt "Enable usb cdc ncm device"
  109. depends on !IDF_CMAKE
  110. default n
  111. config CHERRYUSB_DEVICE_MTP
  112. bool
  113. prompt "Enable usb mtp device, it is commercial charge"
  114. default n
  115. config CHERRYUSB_DEVICE_ADB
  116. bool
  117. prompt "Enable usb adb device"
  118. default n
  119. config CHERRYUSB_DEVICE_DFU
  120. bool
  121. prompt "Enable usb dfu device"
  122. default n
  123. config USBDEV_REQUEST_BUFFER_LEN
  124. int
  125. prompt "Set device control transfer max buffer size"
  126. default 512
  127. config USBDEV_MSC_MAX_BUFSIZE
  128. int
  129. prompt "Set usb msc device max buffer size"
  130. default 512
  131. help
  132. Set the maximum buffer size for usb msc device, it is used to transfer data.
  133. you can change it to a larger value if you need larger speed but must be a power of blocksize.
  134. config USBDEV_RNDIS_USING_LWIP
  135. bool
  136. prompt "Enable usb rndis device with lwip for lan"
  137. default n
  138. config USBDEV_CDC_ECM_USING_LWIP
  139. bool
  140. prompt "Enable usb cdc ecm device with lwip for lan"
  141. default n
  142. choice
  143. prompt "Select usb device template, please select class driver first"
  144. default CHERRYUSB_DEVICE_TEMPLATE_NONE
  145. config CHERRYUSB_DEVICE_TEMPLATE_NONE
  146. bool
  147. prompt "none (Implement it yourself)"
  148. config CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM
  149. bool
  150. prompt "cdc_acm"
  151. depends on CHERRYUSB_DEVICE_CDC_ACM
  152. config CHERRYUSB_DEVICE_TEMPLATE_MSC
  153. bool
  154. prompt "msc_ram"
  155. depends on CHERRYUSB_DEVICE_MSC
  156. config CHERRYUSB_DEVICE_TEMPLATE_HID_KEYBOARD
  157. bool
  158. prompt "hid_keyboard"
  159. depends on CHERRYUSB_DEVICE_HID
  160. config CHERRYUSB_DEVICE_TEMPLATE_HID_MOUSE
  161. bool
  162. prompt "hid_mouse"
  163. depends on CHERRYUSB_DEVICE_HID
  164. config CHERRYUSB_DEVICE_TEMPLATE_HID_CUSTOM
  165. bool
  166. prompt "hid_custom"
  167. depends on CHERRYUSB_DEVICE_HID
  168. config CHERRYUSB_DEVICE_TEMPLATE_VIDEO
  169. bool
  170. prompt "video"
  171. depends on CHERRYUSB_DEVICE_VIDEO
  172. config CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V1_MIC_SPEAKER
  173. bool
  174. prompt "audio_v1_mic_speaker_multichan"
  175. depends on CHERRYUSB_DEVICE_AUDIO
  176. config CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V2_MIC_SPEAKER
  177. bool
  178. prompt "audio_v2_mic_speaker_multichan"
  179. depends on CHERRYUSB_DEVICE_AUDIO
  180. config CHERRYUSB_DEVICE_TEMPLATE_CDC_RNDIS
  181. bool
  182. prompt "cdc_rndis"
  183. depends on CHERRYUSB_DEVICE_CDC_RNDIS
  184. config CHERRYUSB_DEVICE_TEMPLATE_CDC_ECM
  185. bool
  186. prompt "cdc_ecm"
  187. depends on CHERRYUSB_DEVICE_CDC_ECM
  188. config CHERRYUSB_DEVICE_TEMPLATE_CDC_NCM
  189. bool
  190. prompt "cdc_ncm"
  191. depends on CHERRYUSB_DEVICE_CDC_NCM
  192. config CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC
  193. bool
  194. prompt "cdc_acm_msc"
  195. depends on CHERRYUSB_DEVICE_CDC_ACM && CHERRYUSB_DEVICE_MSC
  196. config CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC_HID
  197. bool
  198. prompt "cdc_acm_msc_hid"
  199. depends on CHERRYUSB_DEVICE_CDC_ACM && CHERRYUSB_DEVICE_MSC && CHERRYUSB_DEVICE_HID
  200. config CHERRYUSB_DEVICE_TEMPLATE_WINUSBV1
  201. bool
  202. prompt "winusbv1"
  203. config CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2
  204. bool
  205. prompt "winusbv2"
  206. config CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_CDC
  207. bool
  208. prompt "winusbv2_cdc"
  209. depends on CHERRYUSB_DEVICE_CDC_ACM
  210. config CHERRYUSB_DEVICE_TEMPLATE_WEBUSB_HID
  211. bool
  212. prompt "webusb_hid"
  213. depends on CHERRYUSB_DEVICE_HID
  214. endchoice
  215. endif
  216. menuconfig CHERRYUSB_HOST
  217. bool "Enable usb host mode"
  218. default n
  219. if CHERRYUSB_HOST
  220. choice
  221. prompt "Select usb host ip, and some ip need config in usb_config.h, please check"
  222. default CHERRYUSB_HOST_CUSTOM
  223. config CHERRYUSB_HOST_CUSTOM
  224. bool "CUSTOM (Implement it yourself)"
  225. config CHERRYUSB_HOST_EHCI_BL
  226. bool "ehci_bouffalo"
  227. config CHERRYUSB_HOST_EHCI_HPM
  228. bool "ehci_hpm"
  229. config CHERRYUSB_HOST_EHCI_AIC
  230. bool "ehci_aic"
  231. config CHERRYUSB_HOST_EHCI_MCX
  232. bool "ehci_mcx"
  233. config CHERRYUSB_HOST_EHCI_NUC980
  234. bool "ehci_nuc980"
  235. config CHERRYUSB_HOST_EHCI_MA35D0
  236. bool "ehci_ma35d0"
  237. config CHERRYUSB_HOST_EHCI_CUSTOM
  238. bool "ehci_custom"
  239. config CHERRYUSB_HOST_DWC2_ST
  240. bool "dwc2_st"
  241. config CHERRYUSB_HOST_DWC2_ESP
  242. bool "dwc2_esp"
  243. config CHERRYUSB_HOST_DWC2_KENDRYTE
  244. bool "dwc2_kendryte"
  245. config CHERRYUSB_HOST_DWC2_HC
  246. bool "dwc2_hc"
  247. config CHERRYUSB_HOST_DWC2_NATION
  248. bool "dwc2_nation"
  249. config CHERRYUSB_HOST_DWC2_CUSTOM
  250. bool "dwc2_custom"
  251. config CHERRYUSB_HOST_MUSB_ES
  252. bool "musb_es"
  253. config CHERRYUSB_HOST_MUSB_SUNXI
  254. bool "musb_sunxi"
  255. config CHERRYUSB_HOST_MUSB_BK
  256. bool "musb_bk"
  257. config CHERRYUSB_HOST_MUSB_SIFLI
  258. bool "musb_sifli"
  259. config CHERRYUSB_HOST_MUSB_CUSTOM
  260. bool "musb_custom"
  261. config CHERRYUSB_HOST_PUSB2
  262. bool "pusb2"
  263. config CHERRYUSB_HOST_XHCI_PHYTIUM
  264. bool "xhci_phytium"
  265. config CHERRYUSB_HOST_XHCI_CUSTOM
  266. bool "xhci"
  267. config CHERRYUSB_HOST_KINETIS_MCX
  268. bool "kinetis_mcx"
  269. config CHERRYUSB_HOST_KINETIS_MM32
  270. bool "kinetis_mm32"
  271. config CHERRYUSB_HOST_KINETIS_CUSTOM
  272. bool "kinetis_custom"
  273. config CHERRYUSB_HOST_RP2040
  274. bool "rp2040"
  275. endchoice
  276. config CHERRYUSB_HOST_CDC_ACM
  277. bool
  278. prompt "Enable usb cdc acm driver"
  279. default n
  280. config CHERRYUSB_HOST_HID
  281. bool
  282. prompt "Enable usb hid driver"
  283. default n
  284. config CHERRYUSB_HOST_MSC
  285. bool
  286. prompt "Enable usb msc driver"
  287. default n
  288. config CHERRYUSB_HOST_CDC_ECM
  289. bool
  290. prompt "Enable usb cdc ecm driver"
  291. select USBHOST_PLATFORM_CDC_ECM
  292. default n
  293. config CHERRYUSB_HOST_CDC_RNDIS
  294. bool
  295. prompt "Enable usb rndis driver"
  296. select USBHOST_PLATFORM_CDC_RNDIS
  297. default n
  298. config CHERRYUSB_HOST_CDC_NCM
  299. bool
  300. prompt "Enable usb cdc ncm driver"
  301. select USBHOST_PLATFORM_CDC_NCM
  302. default n
  303. config CHERRYUSB_HOST_VIDEO
  304. bool
  305. prompt "Enable usb video driver, it is commercial charge"
  306. default n
  307. config CHERRYUSB_HOST_AUDIO
  308. bool
  309. prompt "Enable usb audio driver, it is commercial charge"
  310. default n
  311. config CHERRYUSB_HOST_BLUETOOTH
  312. bool
  313. prompt "Enable usb bluetooth driver"
  314. depends on !IDF_CMAKE
  315. default n
  316. config CHERRYUSB_HOST_ASIX
  317. bool
  318. prompt "Enable usb asix driver"
  319. select USBHOST_PLATFORM_ASIX
  320. default n
  321. config CHERRYUSB_HOST_RTL8152
  322. bool
  323. prompt "Enable usb rtl8152 driver"
  324. select USBHOST_PLATFORM_RTL8152
  325. default n
  326. config CHERRYUSB_HOST_FTDI
  327. bool
  328. prompt "Enable usb ftdi driver"
  329. default n
  330. config CHERRYUSB_HOST_CH34X
  331. bool
  332. prompt "Enable usb ch34x driver"
  333. default n
  334. config CHERRYUSB_HOST_CP210X
  335. bool
  336. prompt "Enable usb cp210x driver"
  337. default n
  338. config CHERRYUSB_HOST_PL2303
  339. bool
  340. prompt "Enable usb pl2303 driver"
  341. default n
  342. config CHERRYUSB_HOST_AOA
  343. bool
  344. prompt "Enable usb aoa driver"
  345. default n
  346. config USBHOST_PLATFORM_CDC_ECM
  347. bool
  348. config USBHOST_PLATFORM_CDC_RNDIS
  349. bool
  350. config USBHOST_PLATFORM_CDC_NCM
  351. bool
  352. config USBHOST_PLATFORM_ASIX
  353. bool
  354. config USBHOST_PLATFORM_RTL8152
  355. bool
  356. config USBHOST_PSC_PRIO
  357. int
  358. prompt "Set hubport change thread priority, 0 is the max priority"
  359. default 0
  360. config USBHOST_PSC_STACKSIZE
  361. int
  362. prompt "Set hubport change thread stacksize"
  363. default 4096
  364. config USBHOST_REQUEST_BUFFER_LEN
  365. int
  366. prompt "Set host control transfer max buffer size"
  367. default 512
  368. config USBHOST_CONTROL_TRANSFER_TIMEOUT
  369. int
  370. prompt "Set host control transfer timeout, unit is ms"
  371. default 500
  372. menu "Select USB host template, please select class driver first"
  373. config TEST_USBH_CDC_ACM
  374. int
  375. prompt "demo for test cdc acm"
  376. default 0
  377. depends on CHERRYUSB_HOST_CDC_ACM
  378. config TEST_USBH_HID
  379. int
  380. prompt "demo for test hid"
  381. default 0
  382. depends on CHERRYUSB_HOST_HID
  383. config TEST_USBH_MSC
  384. int
  385. prompt "demo for test msc"
  386. default 0
  387. depends on CHERRYUSB_HOST_MSC
  388. endmenu
  389. endif
  390. endif