Kconfig.rttpkg 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. # Kconfig file for package CherryUSB
  2. menuconfig PKG_USING_CHERRYUSB
  3. depends on RT_VER_NUM < 0x50200
  4. bool "CherryUSB: tiny and portable USB host/device stack for embedded system with USB IP"
  5. default n
  6. if PKG_USING_CHERRYUSB
  7. menuconfig PKG_CHERRYUSB_DEVICE
  8. bool "Enable usb device mode"
  9. default n
  10. if PKG_CHERRYUSB_DEVICE
  11. choice
  12. prompt "Select usb device speed"
  13. default PKG_CHERRYUSB_DEVICE_SPEED_FS
  14. config PKG_CHERRYUSB_DEVICE_SPEED_FS
  15. bool "FS"
  16. config PKG_CHERRYUSB_DEVICE_SPEED_HS
  17. bool "HS"
  18. config PKG_CHERRYUSB_DEVICE_SPEED_AUTO
  19. bool "AUTO"
  20. endchoice
  21. choice
  22. prompt "Select usb device ip, and some ip need config in usb_config.h, please check"
  23. default PKG_CHERRYUSB_DEVICE_CUSTOM
  24. config PKG_CHERRYUSB_DEVICE_CUSTOM
  25. bool "CUSTOM (Implement it yourself)"
  26. config PKG_CHERRYUSB_DEVICE_FSDEV_ST
  27. bool "fsdev_st"
  28. config PKG_CHERRYUSB_DEVICE_FSDEV_CUSTOM
  29. bool "fsdev_custom"
  30. config PKG_CHERRYUSB_DEVICE_DWC2_ST
  31. bool "dwc2_st"
  32. config PKG_CHERRYUSB_DEVICE_DWC2_ESP
  33. bool "dwc2_esp"
  34. config PKG_CHERRYUSB_DEVICE_DWC2_KENDRYTE
  35. bool "dwc2_kendryte"
  36. config PKG_CHERRYUSB_DEVICE_DWC2_AT
  37. bool "dwc2_at"
  38. config PKG_CHERRYUSB_DEVICE_DWC2_HC
  39. bool "dwc2_hc"
  40. config PKG_CHERRYUSB_DEVICE_DWC2_NATION
  41. bool "dwc2_nation"
  42. config PKG_CHERRYUSB_DEVICE_DWC2_GD
  43. bool "dwc2_gd"
  44. config PKG_CHERRYUSB_DEVICE_DWC2_CUSTOM
  45. bool "dwc2_custom"
  46. config PKG_CHERRYUSB_DEVICE_MUSB_ES
  47. bool "musb_es"
  48. config PKG_CHERRYUSB_DEVICE_MUSB_SUNXI
  49. bool "musb_sunxi"
  50. config PKG_CHERRYUSB_DEVICE_MUSB_BK
  51. bool "musb_bk"
  52. config PKG_CHERRYUSB_DEVICE_MUSB_SIFLI
  53. bool "musb_sifli"
  54. config PKG_CHERRYUSB_DEVICE_MUSB_CUSTOM
  55. bool "musb_custom"
  56. config PKG_CHERRYUSB_DEVICE_CHIPIDEA_MCX
  57. bool "chipidea_mcx"
  58. config PKG_CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM
  59. bool "chipidea_custom"
  60. config PKG_CHERRYUSB_DEVICE_KINETIS_MCX
  61. bool "kinetis_mcx"
  62. config PKG_CHERRYUSB_DEVICE_KINETIS_MM32
  63. bool "kinetis_mm32"
  64. config PKG_CHERRYUSB_DEVICE_KINETIS_CUSTOM
  65. bool "kinetis_custom"
  66. config PKG_CHERRYUSB_DEVICE_BL
  67. bool "bouffalo"
  68. config PKG_CHERRYUSB_DEVICE_HPM
  69. bool "hpm"
  70. config PKG_CHERRYUSB_DEVICE_AIC
  71. bool "aic"
  72. config PKG_CHERRYUSB_DEVICE_RP2040
  73. bool "rp2040"
  74. config PKG_CHERRYUSB_DEVICE_CH32
  75. bool "ch32"
  76. config PKG_CHERRYUSB_DEVICE_PUSB2
  77. bool "pusb2"
  78. endchoice
  79. config PKG_CHERRYUSB_DEVICE_CDC_ACM
  80. bool
  81. prompt "Enable usb cdc acm device"
  82. default n
  83. config PKG_CHERRYUSB_DEVICE_HID
  84. bool
  85. prompt "Enable usb hid device"
  86. default n
  87. config PKG_CHERRYUSB_DEVICE_MSC
  88. bool
  89. prompt "Enable usb msc device"
  90. default n
  91. config PKG_CHERRYUSB_DEVICE_AUDIO
  92. bool
  93. prompt "Enable usb audio device"
  94. default n
  95. config PKG_CHERRYUSB_DEVICE_VIDEO
  96. bool
  97. prompt "Enable usb video device"
  98. default n
  99. config PKG_CHERRYUSB_DEVICE_CDC_RNDIS
  100. bool
  101. prompt "Enable usb cdc rndis device"
  102. default n
  103. config PKG_CHERRYUSB_DEVICE_CDC_ECM
  104. bool
  105. prompt "Enable usb cdc ecm device"
  106. default n
  107. config PKG_CHERRYUSB_DEVICE_CDC_NCM
  108. bool
  109. prompt "Enable usb cdc ncm device"
  110. default n
  111. config PKG_CHERRYUSB_DEVICE_MTP
  112. bool
  113. prompt "Enable usb mtp device, it is commercial charge"
  114. default n
  115. config PKG_CHERRYUSB_DEVICE_ADB
  116. bool
  117. prompt "Enable usb adb device"
  118. default n
  119. config PKG_CHERRYUSB_DEVICE_DFU
  120. bool
  121. prompt "Enable usb dfu device"
  122. default n
  123. config PKG_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
  124. bool
  125. prompt "Enable chardev for cdc acm device"
  126. default n
  127. config CONFIG_USBDEV_REQUEST_BUFFER_LEN
  128. int
  129. prompt "Set device control transfer max buffer size"
  130. default 512
  131. config CONFIG_USBDEV_MSC_MAX_BUFSIZE
  132. int
  133. prompt "Set usb msc device max buffer size"
  134. default 512
  135. help
  136. Set the maximum buffer size for usb msc device, it is used to transfer data.
  137. you can change it to a larger value if you need larger speed but must be a power of blocksize.
  138. config CONFIG_USBDEV_RNDIS_USING_LWIP
  139. bool
  140. prompt "Enable usb rndis device with lwip for lan"
  141. default n
  142. config CONFIG_USBDEV_CDC_ECM_USING_LWIP
  143. bool
  144. prompt "Enable usb cdc ecm device with lwip for lan"
  145. default n
  146. choice
  147. prompt "Select usb device template, please select class driver first"
  148. default PKG_CHERRYUSB_DEVICE_TEMPLATE_NONE
  149. config PKG_CHERRYUSB_DEVICE_TEMPLATE_NONE
  150. bool
  151. prompt "none (Implement it yourself)"
  152. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM
  153. bool
  154. prompt "cdc_acm"
  155. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM
  156. config PKG_CHERRYUSB_DEVICE_TEMPLATE_MSC
  157. bool
  158. prompt "msc_ram"
  159. depends on PKG_CHERRYUSB_DEVICE_MSC
  160. config PKG_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
  161. bool
  162. prompt "msc_blkdev"
  163. depends on PKG_CHERRYUSB_DEVICE_MSC
  164. config PKG_CHERRYUSB_DEVICE_TEMPLATE_HID_KEYBOARD
  165. bool
  166. prompt "hid_keyboard"
  167. depends on PKG_CHERRYUSB_DEVICE_HID
  168. config PKG_CHERRYUSB_DEVICE_TEMPLATE_HID_MOUSE
  169. bool
  170. prompt "hid_mouse"
  171. depends on PKG_CHERRYUSB_DEVICE_HID
  172. config PKG_CHERRYUSB_DEVICE_TEMPLATE_HID_CUSTOM
  173. bool
  174. prompt "hid_custom"
  175. depends on PKG_CHERRYUSB_DEVICE_HID
  176. config PKG_CHERRYUSB_DEVICE_TEMPLATE_VIDEO
  177. bool
  178. prompt "video"
  179. depends on PKG_CHERRYUSB_DEVICE_VIDEO
  180. config PKG_CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V1_MIC_SPEAKER
  181. bool
  182. prompt "audio_v1_mic_speaker_multichan"
  183. depends on PKG_CHERRYUSB_DEVICE_AUDIO
  184. config PKG_CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V2_MIC_SPEAKER
  185. bool
  186. prompt "audio_v2_mic_speaker_multichan"
  187. depends on PKG_CHERRYUSB_DEVICE_AUDIO
  188. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_RNDIS
  189. bool
  190. prompt "cdc_rndis"
  191. depends on PKG_CHERRYUSB_DEVICE_CDC_RNDIS
  192. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ECM
  193. bool
  194. prompt "cdc_ecm"
  195. depends on PKG_CHERRYUSB_DEVICE_CDC_ECM
  196. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_NCM
  197. bool
  198. prompt "cdc_ncm"
  199. depends on PKG_CHERRYUSB_DEVICE_CDC_NCM
  200. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC
  201. bool
  202. prompt "cdc_acm_msc"
  203. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM && PKG_CHERRYUSB_DEVICE_MSC
  204. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC_HID
  205. bool
  206. prompt "cdc_acm_msc_hid"
  207. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM && PKG_CHERRYUSB_DEVICE_MSC && PKG_CHERRYUSB_DEVICE_HID
  208. config PKG_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV1
  209. bool
  210. prompt "winusbv1"
  211. config PKG_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_CDC
  212. bool
  213. prompt "winusbv2_cdc"
  214. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM
  215. config PKG_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_HID
  216. bool
  217. prompt "winusbv2_hid"
  218. depends on PKG_CHERRYUSB_DEVICE_HID
  219. config PKG_CHERRYUSB_DEVICE_TEMPLATE_ADB
  220. bool
  221. prompt "adb"
  222. depends on PKG_CHERRYUSB_DEVICE_ADB
  223. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_CHARDEV
  224. bool
  225. prompt "cdc_acm_chardev"
  226. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
  227. endchoice
  228. config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
  229. string "usb device msc block device name"
  230. depends on PKG_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
  231. default "sd0"
  232. endif
  233. menuconfig PKG_CHERRYUSB_HOST
  234. bool "Enable usb host mode"
  235. default n
  236. if PKG_CHERRYUSB_HOST
  237. choice
  238. prompt "Select usb host ip, and some ip need config in usb_config.h, please check"
  239. default PKG_CHERRYUSB_HOST_CUSTOM
  240. config PKG_CHERRYUSB_HOST_CUSTOM
  241. bool "CUSTOM (Implement it yourself)"
  242. config PKG_CHERRYUSB_HOST_EHCI_BL
  243. bool "ehci_bouffalo"
  244. config PKG_CHERRYUSB_HOST_EHCI_HPM
  245. bool "ehci_hpm"
  246. config PKG_CHERRYUSB_HOST_EHCI_AIC
  247. bool "ehci_aic"
  248. config PKG_CHERRYUSB_HOST_EHCI_MCX
  249. bool "ehci_mcx"
  250. config PKG_CHERRYUSB_HOST_EHCI_NUC980
  251. bool "ehci_nuc980"
  252. config PKG_CHERRYUSB_HOST_EHCI_MA35D0
  253. bool "ehci_ma35d0"
  254. config PKG_CHERRYUSB_HOST_EHCI_CUSTOM
  255. bool "ehci_custom"
  256. config PKG_CHERRYUSB_HOST_DWC2_ST
  257. bool "dwc2_st"
  258. config PKG_CHERRYUSB_HOST_DWC2_ESP
  259. bool "dwc2_esp"
  260. config PKG_CHERRYUSB_HOST_DWC2_KENDRYTE
  261. bool "dwc2_kendryte"
  262. config PKG_CHERRYUSB_HOST_DWC2_HC
  263. bool "dwc2_hc"
  264. config PKG_CHERRYUSB_HOST_DWC2_NATION
  265. bool "dwc2_nation"
  266. config PKG_CHERRYUSB_HOST_DWC2_CUSTOM
  267. bool "dwc2_custom"
  268. config PKG_CHERRYUSB_HOST_MUSB_ES
  269. bool "musb_es"
  270. config PKG_CHERRYUSB_HOST_MUSB_SUNXI
  271. bool "musb_sunxi"
  272. config PKG_CHERRYUSB_HOST_MUSB_BK
  273. bool "musb_bk"
  274. config PKG_CHERRYUSB_HOST_MUSB_SIFLI
  275. bool "musb_sifli"
  276. config PKG_CHERRYUSB_HOST_MUSB_CUSTOM
  277. bool "musb_custom"
  278. config PKG_CHERRYUSB_HOST_PUSB2
  279. bool "pusb2"
  280. config PKG_CHERRYUSB_HOST_XHCI
  281. bool "xhci"
  282. config PKG_CHERRYUSB_HOST_RP2040
  283. bool "rp2040"
  284. endchoice
  285. config PKG_CHERRYUSB_HOST_CDC_ACM
  286. bool
  287. prompt "Enable usb cdc acm driver"
  288. default n
  289. config PKG_CHERRYUSB_HOST_HID
  290. bool
  291. prompt "Enable usb hid driver"
  292. default n
  293. config PKG_CHERRYUSB_HOST_MSC
  294. bool
  295. prompt "Enable usb msc driver"
  296. default n
  297. select RT_USING_DFS
  298. select RT_USING_DFS_ELMFAT
  299. config PKG_CHERRYUSB_HOST_CDC_ECM
  300. bool
  301. prompt "Enable usb cdc ecm driver"
  302. select RT_USING_LWIP
  303. select CONFIG_USBHOST_PLATFORM_CDC_ECM
  304. default n
  305. config PKG_CHERRYUSB_HOST_CDC_RNDIS
  306. bool
  307. prompt "Enable usb rndis driver"
  308. select RT_USING_LWIP
  309. select CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  310. default n
  311. config PKG_CHERRYUSB_HOST_CDC_NCM
  312. bool
  313. prompt "Enable usb cdc ncm driver"
  314. select RT_USING_LWIP
  315. select CONFIG_USBHOST_PLATFORM_CDC_NCM
  316. default n
  317. config PKG_CHERRYUSB_HOST_VIDEO
  318. bool
  319. prompt "Enable usb video driver, it is commercial charge"
  320. default n
  321. config PKG_CHERRYUSB_HOST_AUDIO
  322. bool
  323. prompt "Enable usb audio driver, it is commercial charge"
  324. default n
  325. config PKG_CHERRYUSB_HOST_BLUETOOTH
  326. bool
  327. prompt "Enable usb bluetooth driver"
  328. default n
  329. config PKG_CHERRYUSB_HOST_ASIX
  330. bool
  331. prompt "Enable usb asix driver"
  332. select RT_USING_LWIP
  333. select CONFIG_USBHOST_PLATFORM_ASIX
  334. default n
  335. config PKG_CHERRYUSB_HOST_RTL8152
  336. bool
  337. prompt "Enable usb rtl8152 driver"
  338. select RT_USING_LWIP
  339. select CONFIG_USBHOST_PLATFORM_RTL8152
  340. default n
  341. config PKG_CHERRYUSB_HOST_FTDI
  342. bool
  343. prompt "Enable usb ftdi driver"
  344. default n
  345. config PKG_CHERRYUSB_HOST_CH34X
  346. bool
  347. prompt "Enable usb ch34x driver"
  348. default n
  349. config PKG_CHERRYUSB_HOST_CP210X
  350. bool
  351. prompt "Enable usb cp210x driver"
  352. default n
  353. config PKG_CHERRYUSB_HOST_PL2303
  354. bool
  355. prompt "Enable usb pl2303 driver"
  356. default n
  357. config CONFIG_USBHOST_PLATFORM_CDC_ECM
  358. bool
  359. config CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  360. bool
  361. config CONFIG_USBHOST_PLATFORM_CDC_NCM
  362. bool
  363. config CONFIG_USBHOST_PLATFORM_ASIX
  364. bool
  365. config CONFIG_USBHOST_PLATFORM_RTL8152
  366. bool
  367. config CONFIG_USBHOST_PSC_PRIO
  368. int
  369. prompt "Set hubport change thread priority, 0 is the max priority"
  370. default 0
  371. config CONFIG_USBHOST_PSC_STACKSIZE
  372. int
  373. prompt "Set hubport change thread stacksize"
  374. default 4096
  375. config CONFIG_USBHOST_REQUEST_BUFFER_LEN
  376. int
  377. prompt "Set host control transfer max buffer size"
  378. default 512
  379. config CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT
  380. int
  381. prompt "Set host control transfer timeout, unit is ms"
  382. default 500
  383. config RT_LWIP_PBUF_POOL_BUFSIZE
  384. int "The size of each pbuf in the pbuf pool"
  385. range 1500 2000
  386. default 1600
  387. config CONFIG_USB_DFS_MOUNT_POINT
  388. string "usb host dfs mount point"
  389. depends on RT_CHERRYUSB_HOST_MSC
  390. default "/"
  391. menu "Select USB host template, please select class driver first"
  392. config CONFIG_TEST_USBH_CDC_ACM
  393. int
  394. prompt "demo for test cdc acm, cannot enable this demo, we have used serial framework instead"
  395. default 0
  396. depends on PKG_CHERRYUSB_HOST_CDC_ACM
  397. config CONFIG_TEST_USBH_HID
  398. int
  399. prompt "demo for test hid"
  400. default 0
  401. depends on PKG_CHERRYUSB_HOST_HID
  402. config CONFIG_TEST_USBH_MSC
  403. int
  404. prompt "demo for test msc, cannot enable this demo, we have used dfs instead"
  405. default 0
  406. depends on PKG_CHERRYUSB_HOST_MSC
  407. endmenu
  408. endif
  409. config PKG_CHERRYUSB_PATH
  410. string
  411. default "/packages/system/CherryUSB"
  412. choice
  413. prompt "Version"
  414. default PKG_USING_CHERRYUSB_V010502
  415. help
  416. Select the package version
  417. config PKG_USING_CHERRYUSB_LATEST_VERSION
  418. bool "latest"
  419. config PKG_USING_CHERRYUSB_V010502
  420. bool "v1.5.2"
  421. config PKG_USING_CHERRYUSB_V010501
  422. bool "v1.5.1"
  423. config PKG_USING_CHERRYUSB_V010500
  424. bool "v1.5.0"
  425. config PKG_USING_CHERRYUSB_V010403
  426. bool "v1.4.3"
  427. config PKG_USING_CHERRYUSB_V010301
  428. bool "v1.3.1"
  429. config PKG_USING_CHERRYUSB_V010200
  430. bool "v1.2.0"
  431. config PKG_USING_CHERRYUSB_V001002
  432. bool "v0.10.2"
  433. endchoice
  434. config PKG_CHERRYUSB_VER
  435. string
  436. default "latest" if PKG_USING_CHERRYUSB_LATEST_VERSION
  437. default "v1.5.2" if PKG_USING_CHERRYUSB_V010502
  438. default "v1.5.1" if PKG_USING_CHERRYUSB_V010501
  439. default "v1.5.0" if PKG_USING_CHERRYUSB_V010500
  440. default "v1.4.3" if PKG_USING_CHERRYUSB_V010403
  441. default "v1.3.1" if PKG_USING_CHERRYUSB_V010301
  442. default "v1.2.0" if PKG_USING_CHERRYUSB_V010200
  443. default "v0.10.2" if PKG_USING_CHERRYUSB_V001002
  444. endif