Kconfig.rttpkg 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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
  212. bool
  213. prompt "winusbv2"
  214. config PKG_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_CDC
  215. bool
  216. prompt "winusbv2_cdc"
  217. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM
  218. config PKG_CHERRYUSB_DEVICE_TEMPLATE_WEBUSB_HID
  219. bool
  220. prompt "webusb_hid"
  221. depends on PKG_CHERRYUSB_DEVICE_HID
  222. config PKG_CHERRYUSB_DEVICE_TEMPLATE_ADB
  223. bool
  224. prompt "adb"
  225. depends on PKG_CHERRYUSB_DEVICE_ADB
  226. config PKG_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_CHARDEV
  227. bool
  228. prompt "cdc_acm_chardev"
  229. depends on PKG_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
  230. endchoice
  231. config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
  232. string "usb device msc block device name"
  233. depends on PKG_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
  234. default "sd0"
  235. endif
  236. menuconfig PKG_CHERRYUSB_HOST
  237. bool "Enable usb host mode"
  238. default n
  239. if PKG_CHERRYUSB_HOST
  240. choice
  241. prompt "Select usb host ip, and some ip need config in usb_config.h, please check"
  242. default PKG_CHERRYUSB_HOST_CUSTOM
  243. config PKG_CHERRYUSB_HOST_CUSTOM
  244. bool "CUSTOM (Implement it yourself)"
  245. config PKG_CHERRYUSB_HOST_EHCI_BL
  246. bool "ehci_bouffalo"
  247. config PKG_CHERRYUSB_HOST_EHCI_HPM
  248. bool "ehci_hpm"
  249. config PKG_CHERRYUSB_HOST_EHCI_AIC
  250. bool "ehci_aic"
  251. config PKG_CHERRYUSB_HOST_EHCI_MCX
  252. bool "ehci_mcx"
  253. config PKG_CHERRYUSB_HOST_EHCI_NUC980
  254. bool "ehci_nuc980"
  255. config PKG_CHERRYUSB_HOST_EHCI_MA35D0
  256. bool "ehci_ma35d0"
  257. config PKG_CHERRYUSB_HOST_EHCI_CUSTOM
  258. bool "ehci_custom"
  259. config PKG_CHERRYUSB_HOST_DWC2_ST
  260. bool "dwc2_st"
  261. config PKG_CHERRYUSB_HOST_DWC2_ESP
  262. bool "dwc2_esp"
  263. config PKG_CHERRYUSB_HOST_DWC2_KENDRYTE
  264. bool "dwc2_kendryte"
  265. config PKG_CHERRYUSB_HOST_DWC2_HC
  266. bool "dwc2_hc"
  267. config PKG_CHERRYUSB_HOST_DWC2_NATION
  268. bool "dwc2_nation"
  269. config PKG_CHERRYUSB_HOST_DWC2_CUSTOM
  270. bool "dwc2_custom"
  271. config PKG_CHERRYUSB_HOST_MUSB_ES
  272. bool "musb_es"
  273. config PKG_CHERRYUSB_HOST_MUSB_SUNXI
  274. bool "musb_sunxi"
  275. config PKG_CHERRYUSB_HOST_MUSB_BK
  276. bool "musb_bk"
  277. config PKG_CHERRYUSB_HOST_MUSB_SIFLI
  278. bool "musb_sifli"
  279. config PKG_CHERRYUSB_HOST_MUSB_CUSTOM
  280. bool "musb_custom"
  281. config PKG_CHERRYUSB_HOST_PUSB2
  282. bool "pusb2"
  283. config PKG_CHERRYUSB_HOST_XHCI
  284. bool "xhci"
  285. config PKG_CHERRYUSB_HOST_RP2040
  286. bool "rp2040"
  287. endchoice
  288. config PKG_CHERRYUSB_HOST_CDC_ACM
  289. bool
  290. prompt "Enable usb cdc acm driver"
  291. default n
  292. config PKG_CHERRYUSB_HOST_HID
  293. bool
  294. prompt "Enable usb hid driver"
  295. default n
  296. config PKG_CHERRYUSB_HOST_MSC
  297. bool
  298. prompt "Enable usb msc driver"
  299. default n
  300. select RT_USING_DFS
  301. select RT_USING_DFS_ELMFAT
  302. config PKG_CHERRYUSB_HOST_CDC_ECM
  303. bool
  304. prompt "Enable usb cdc ecm driver"
  305. select RT_USING_LWIP
  306. select CONFIG_USBHOST_PLATFORM_CDC_ECM
  307. default n
  308. config PKG_CHERRYUSB_HOST_CDC_RNDIS
  309. bool
  310. prompt "Enable usb rndis driver"
  311. select RT_USING_LWIP
  312. select CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  313. default n
  314. config PKG_CHERRYUSB_HOST_CDC_NCM
  315. bool
  316. prompt "Enable usb cdc ncm driver"
  317. select RT_USING_LWIP
  318. select CONFIG_USBHOST_PLATFORM_CDC_NCM
  319. default n
  320. config PKG_CHERRYUSB_HOST_VIDEO
  321. bool
  322. prompt "Enable usb video driver, it is commercial charge"
  323. default n
  324. config PKG_CHERRYUSB_HOST_AUDIO
  325. bool
  326. prompt "Enable usb audio driver, it is commercial charge"
  327. default n
  328. config PKG_CHERRYUSB_HOST_BLUETOOTH
  329. bool
  330. prompt "Enable usb bluetooth driver"
  331. default n
  332. config PKG_CHERRYUSB_HOST_ASIX
  333. bool
  334. prompt "Enable usb asix driver"
  335. select RT_USING_LWIP
  336. select CONFIG_USBHOST_PLATFORM_ASIX
  337. default n
  338. config PKG_CHERRYUSB_HOST_RTL8152
  339. bool
  340. prompt "Enable usb rtl8152 driver"
  341. select RT_USING_LWIP
  342. select CONFIG_USBHOST_PLATFORM_RTL8152
  343. default n
  344. config PKG_CHERRYUSB_HOST_FTDI
  345. bool
  346. prompt "Enable usb ftdi driver"
  347. default n
  348. config PKG_CHERRYUSB_HOST_CH34X
  349. bool
  350. prompt "Enable usb ch34x driver"
  351. default n
  352. config PKG_CHERRYUSB_HOST_CP210X
  353. bool
  354. prompt "Enable usb cp210x driver"
  355. default n
  356. config PKG_CHERRYUSB_HOST_PL2303
  357. bool
  358. prompt "Enable usb pl2303 driver"
  359. default n
  360. config CONFIG_USBHOST_PLATFORM_CDC_ECM
  361. bool
  362. config CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  363. bool
  364. config CONFIG_USBHOST_PLATFORM_CDC_NCM
  365. bool
  366. config CONFIG_USBHOST_PLATFORM_ASIX
  367. bool
  368. config CONFIG_USBHOST_PLATFORM_RTL8152
  369. bool
  370. config CONFIG_USBHOST_PSC_PRIO
  371. int
  372. prompt "Set hubport change thread priority, 0 is the max priority"
  373. default 0
  374. config CONFIG_USBHOST_PSC_STACKSIZE
  375. int
  376. prompt "Set hubport change thread stacksize"
  377. default 4096
  378. config CONFIG_USBHOST_REQUEST_BUFFER_LEN
  379. int
  380. prompt "Set host control transfer max buffer size"
  381. default 512
  382. config CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT
  383. int
  384. prompt "Set host control transfer timeout, unit is ms"
  385. default 500
  386. config RT_LWIP_PBUF_POOL_BUFSIZE
  387. int "The size of each pbuf in the pbuf pool"
  388. range 1500 2000
  389. default 1600
  390. config CONFIG_USB_DFS_MOUNT_POINT
  391. string "usb host dfs mount point"
  392. depends on RT_CHERRYUSB_HOST_MSC
  393. default "/"
  394. menu "Select USB host template, please select class driver first"
  395. config CONFIG_TEST_USBH_CDC_ACM
  396. int
  397. prompt "demo for test cdc acm, cannot enable this demo, we have used serial framework instead"
  398. default 0
  399. depends on PKG_CHERRYUSB_HOST_CDC_ACM
  400. config CONFIG_TEST_USBH_HID
  401. int
  402. prompt "demo for test hid"
  403. default 0
  404. depends on PKG_CHERRYUSB_HOST_HID
  405. config CONFIG_TEST_USBH_MSC
  406. int
  407. prompt "demo for test msc, cannot enable this demo, we have used dfs instead"
  408. default 0
  409. depends on PKG_CHERRYUSB_HOST_MSC
  410. endmenu
  411. endif
  412. config PKG_CHERRYUSB_PATH
  413. string
  414. default "/packages/system/CherryUSB"
  415. choice
  416. prompt "Version"
  417. default PKG_USING_CHERRYUSB_V010503
  418. help
  419. Select the package version
  420. config PKG_USING_CHERRYUSB_LATEST_VERSION
  421. bool "latest"
  422. config PKG_USING_CHERRYUSB_V010502
  423. bool "v1.5.3"
  424. config PKG_USING_CHERRYUSB_V010502
  425. bool "v1.5.2"
  426. config PKG_USING_CHERRYUSB_V010501
  427. bool "v1.5.1"
  428. config PKG_USING_CHERRYUSB_V010500
  429. bool "v1.5.0"
  430. config PKG_USING_CHERRYUSB_V010403
  431. bool "v1.4.3"
  432. config PKG_USING_CHERRYUSB_V010301
  433. bool "v1.3.1"
  434. config PKG_USING_CHERRYUSB_V010200
  435. bool "v1.2.0"
  436. config PKG_USING_CHERRYUSB_V001002
  437. bool "v0.10.2"
  438. endchoice
  439. config PKG_CHERRYUSB_VER
  440. string
  441. default "latest" if PKG_USING_CHERRYUSB_LATEST_VERSION
  442. default "v1.5.3" if PKG_USING_CHERRYUSB_V010503
  443. default "v1.5.2" if PKG_USING_CHERRYUSB_V010502
  444. default "v1.5.1" if PKG_USING_CHERRYUSB_V010501
  445. default "v1.5.0" if PKG_USING_CHERRYUSB_V010500
  446. default "v1.4.3" if PKG_USING_CHERRYUSB_V010403
  447. default "v1.3.1" if PKG_USING_CHERRYUSB_V010301
  448. default "v1.2.0" if PKG_USING_CHERRYUSB_V010200
  449. default "v0.10.2" if PKG_USING_CHERRYUSB_V001002
  450. endif