Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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_CDC
  204. bool
  205. prompt "winusbv2_cdc"
  206. depends on CHERRYUSB_DEVICE_CDC_ACM
  207. config CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_HID
  208. bool
  209. prompt "winusbv2_hid"
  210. depends on CHERRYUSB_DEVICE_HID
  211. endchoice
  212. endif
  213. menuconfig CHERRYUSB_HOST
  214. bool "Enable usb host mode"
  215. default n
  216. if CHERRYUSB_HOST
  217. choice
  218. prompt "Select usb host ip, and some ip need config in usb_config.h, please check"
  219. default CHERRYUSB_HOST_CUSTOM
  220. config CHERRYUSB_HOST_CUSTOM
  221. bool "CUSTOM (Implement it yourself)"
  222. config CHERRYUSB_HOST_EHCI_BL
  223. bool "ehci_bouffalo"
  224. config CHERRYUSB_HOST_EHCI_HPM
  225. bool "ehci_hpm"
  226. config CHERRYUSB_HOST_EHCI_AIC
  227. bool "ehci_aic"
  228. config CHERRYUSB_HOST_EHCI_MCX
  229. bool "ehci_mcx"
  230. config CHERRYUSB_HOST_EHCI_NUC980
  231. bool "ehci_nuc980"
  232. config CHERRYUSB_HOST_EHCI_MA35D0
  233. bool "ehci_ma35d0"
  234. config CHERRYUSB_HOST_EHCI_CUSTOM
  235. bool "ehci_custom"
  236. config CHERRYUSB_HOST_DWC2_ST
  237. bool "dwc2_st"
  238. config CHERRYUSB_HOST_DWC2_ESP
  239. bool "dwc2_esp"
  240. config CHERRYUSB_HOST_DWC2_KENDRYTE
  241. bool "dwc2_kendryte"
  242. config CHERRYUSB_HOST_DWC2_HC
  243. bool "dwc2_hc"
  244. config CHERRYUSB_HOST_DWC2_NATION
  245. bool "dwc2_nation"
  246. config CHERRYUSB_HOST_DWC2_CUSTOM
  247. bool "dwc2_custom"
  248. config CHERRYUSB_HOST_MUSB_ES
  249. bool "musb_es"
  250. config CHERRYUSB_HOST_MUSB_SUNXI
  251. bool "musb_sunxi"
  252. config CHERRYUSB_HOST_MUSB_BK
  253. bool "musb_bk"
  254. config CHERRYUSB_HOST_MUSB_SIFLI
  255. bool "musb_sifli"
  256. config CHERRYUSB_HOST_MUSB_CUSTOM
  257. bool "musb_custom"
  258. config CHERRYUSB_HOST_PUSB2
  259. bool "pusb2"
  260. config CHERRYUSB_HOST_XHCI_PHYTIUM
  261. bool "xhci_phytium"
  262. config CHERRYUSB_HOST_XHCI_CUSTOM
  263. bool "xhci"
  264. config CHERRYUSB_HOST_KINETIS_MCX
  265. bool "kinetis_mcx"
  266. config CHERRYUSB_HOST_KINETIS_MM32
  267. bool "kinetis_mm32"
  268. config CHERRYUSB_HOST_KINETIS_CUSTOM
  269. bool "kinetis_custom"
  270. config CHERRYUSB_HOST_RP2040
  271. bool "rp2040"
  272. endchoice
  273. config CHERRYUSB_HOST_CDC_ACM
  274. bool
  275. prompt "Enable usb cdc acm driver"
  276. default n
  277. config CHERRYUSB_HOST_HID
  278. bool
  279. prompt "Enable usb hid driver"
  280. default n
  281. config CHERRYUSB_HOST_MSC
  282. bool
  283. prompt "Enable usb msc driver"
  284. default n
  285. config CHERRYUSB_HOST_CDC_ECM
  286. bool
  287. prompt "Enable usb cdc ecm driver"
  288. select USBHOST_PLATFORM_CDC_ECM
  289. default n
  290. config CHERRYUSB_HOST_CDC_RNDIS
  291. bool
  292. prompt "Enable usb rndis driver"
  293. select USBHOST_PLATFORM_CDC_RNDIS
  294. default n
  295. config CHERRYUSB_HOST_CDC_NCM
  296. bool
  297. prompt "Enable usb cdc ncm driver"
  298. select USBHOST_PLATFORM_CDC_NCM
  299. default n
  300. config CHERRYUSB_HOST_VIDEO
  301. bool
  302. prompt "Enable usb video driver, it is commercial charge"
  303. default n
  304. config CHERRYUSB_HOST_AUDIO
  305. bool
  306. prompt "Enable usb audio driver, it is commercial charge"
  307. default n
  308. config CHERRYUSB_HOST_BLUETOOTH
  309. bool
  310. prompt "Enable usb bluetooth driver"
  311. depends on !IDF_CMAKE
  312. default n
  313. config CHERRYUSB_HOST_ASIX
  314. bool
  315. prompt "Enable usb asix driver"
  316. select USBHOST_PLATFORM_ASIX
  317. default n
  318. config CHERRYUSB_HOST_RTL8152
  319. bool
  320. prompt "Enable usb rtl8152 driver"
  321. select USBHOST_PLATFORM_RTL8152
  322. default n
  323. config CHERRYUSB_HOST_FTDI
  324. bool
  325. prompt "Enable usb ftdi driver"
  326. default n
  327. config CHERRYUSB_HOST_CH34X
  328. bool
  329. prompt "Enable usb ch34x driver"
  330. default n
  331. config CHERRYUSB_HOST_CP210X
  332. bool
  333. prompt "Enable usb cp210x driver"
  334. default n
  335. config CHERRYUSB_HOST_PL2303
  336. bool
  337. prompt "Enable usb pl2303 driver"
  338. default n
  339. config CHERRYUSB_HOST_AOA
  340. bool
  341. prompt "Enable usb aoa driver"
  342. default n
  343. config USBHOST_PLATFORM_CDC_ECM
  344. bool
  345. config USBHOST_PLATFORM_CDC_RNDIS
  346. bool
  347. config USBHOST_PLATFORM_CDC_NCM
  348. bool
  349. config USBHOST_PLATFORM_ASIX
  350. bool
  351. config USBHOST_PLATFORM_RTL8152
  352. bool
  353. config USBHOST_PSC_PRIO
  354. int
  355. prompt "Set hubport change thread priority, 0 is the max priority"
  356. default 0
  357. config USBHOST_PSC_STACKSIZE
  358. int
  359. prompt "Set hubport change thread stacksize"
  360. default 4096
  361. config USBHOST_REQUEST_BUFFER_LEN
  362. int
  363. prompt "Set host control transfer max buffer size"
  364. default 512
  365. config USBHOST_CONTROL_TRANSFER_TIMEOUT
  366. int
  367. prompt "Set host control transfer timeout, unit is ms"
  368. default 500
  369. menu "Select USB host template, please select class driver first"
  370. config TEST_USBH_CDC_ACM
  371. int
  372. prompt "demo for test cdc acm"
  373. default 0
  374. depends on CHERRYUSB_HOST_CDC_ACM
  375. config TEST_USBH_HID
  376. int
  377. prompt "demo for test hid"
  378. default 0
  379. depends on CHERRYUSB_HOST_HID
  380. config TEST_USBH_MSC
  381. int
  382. prompt "demo for test msc"
  383. default 0
  384. depends on CHERRYUSB_HOST_MSC
  385. endmenu
  386. endif
  387. endif