Kconfig.rttpkg 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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. select CONFIG_USBHOST_SERIAL
  292. default n
  293. config PKG_CHERRYUSB_HOST_HID
  294. bool
  295. prompt "Enable usb hid driver"
  296. default n
  297. config PKG_CHERRYUSB_HOST_MSC
  298. bool
  299. prompt "Enable usb msc driver"
  300. default n
  301. select RT_USING_DFS
  302. select RT_USING_DFS_ELMFAT
  303. config PKG_CHERRYUSB_HOST_CDC_ECM
  304. bool
  305. prompt "Enable usb cdc ecm driver"
  306. select RT_USING_LWIP
  307. select CONFIG_USBHOST_PLATFORM_CDC_ECM
  308. default n
  309. config PKG_CHERRYUSB_HOST_CDC_RNDIS
  310. bool
  311. prompt "Enable usb rndis driver"
  312. select RT_USING_LWIP
  313. select CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  314. default n
  315. config PKG_CHERRYUSB_HOST_CDC_NCM
  316. bool
  317. prompt "Enable usb cdc ncm driver"
  318. select RT_USING_LWIP
  319. select CONFIG_USBHOST_PLATFORM_CDC_NCM
  320. default n
  321. config PKG_CHERRYUSB_HOST_VIDEO
  322. bool
  323. prompt "Enable usb video driver, it is commercial charge"
  324. default n
  325. config PKG_CHERRYUSB_HOST_AUDIO
  326. bool
  327. prompt "Enable usb audio driver, it is commercial charge"
  328. default n
  329. config PKG_CHERRYUSB_HOST_BLUETOOTH
  330. bool
  331. prompt "Enable usb bluetooth driver"
  332. default n
  333. config PKG_CHERRYUSB_HOST_ASIX
  334. bool
  335. prompt "Enable usb asix driver"
  336. select RT_USING_LWIP
  337. select CONFIG_USBHOST_PLATFORM_ASIX
  338. default n
  339. config PKG_CHERRYUSB_HOST_RTL8152
  340. bool
  341. prompt "Enable usb rtl8152 driver"
  342. select RT_USING_LWIP
  343. select CONFIG_USBHOST_PLATFORM_RTL8152
  344. default n
  345. config PKG_CHERRYUSB_HOST_FTDI
  346. bool
  347. prompt "Enable usb ftdi driver"
  348. select CONFIG_USBHOST_SERIAL
  349. default n
  350. config PKG_CHERRYUSB_HOST_CH34X
  351. bool
  352. prompt "Enable usb ch34x driver"
  353. select CONFIG_USBHOST_SERIAL
  354. default n
  355. config PKG_CHERRYUSB_HOST_CP210X
  356. bool
  357. prompt "Enable usb cp210x driver"
  358. select CONFIG_USBHOST_SERIAL
  359. default n
  360. config PKG_CHERRYUSB_HOST_PL2303
  361. bool
  362. prompt "Enable usb pl2303 driver"
  363. select CONFIG_USBHOST_SERIAL
  364. default n
  365. config PKG_CHERRYUSB_HOST_GSM
  366. bool
  367. prompt "Enable usb gsm driver for 4g module"
  368. select CONFIG_USBHOST_SERIAL
  369. default n
  370. config CONFIG_USBHOST_SERIAL
  371. bool
  372. config CONFIG_USBHOST_PLATFORM_CDC_ECM
  373. bool
  374. config CONFIG_USBHOST_PLATFORM_CDC_RNDIS
  375. bool
  376. config CONFIG_USBHOST_PLATFORM_CDC_NCM
  377. bool
  378. config CONFIG_USBHOST_PLATFORM_ASIX
  379. bool
  380. config CONFIG_USBHOST_PLATFORM_RTL8152
  381. bool
  382. config CONFIG_USBHOST_PSC_PRIO
  383. int
  384. prompt "Set hubport change thread priority, 0 is the max priority"
  385. default 0
  386. config CONFIG_USBHOST_PSC_STACKSIZE
  387. int
  388. prompt "Set hubport change thread stacksize"
  389. default 4096
  390. config CONFIG_USBHOST_REQUEST_BUFFER_LEN
  391. int
  392. prompt "Set host control transfer max buffer size"
  393. default 512
  394. config CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT
  395. int
  396. prompt "Set host control transfer timeout, unit is ms"
  397. default 500
  398. config CONFIG_USBHOST_SERIAL_RX_SIZE
  399. int
  400. prompt "Set host serial rx max buffer size"
  401. default 2048
  402. config RT_LWIP_PBUF_POOL_BUFSIZE
  403. int "The size of each pbuf in the pbuf pool"
  404. range 1500 2000
  405. default 1600
  406. config CONFIG_USB_DFS_MOUNT_POINT
  407. string "usb host dfs mount point"
  408. depends on RT_CHERRYUSB_HOST_MSC
  409. default "/"
  410. menu "Select USB host template, please select class driver first"
  411. config CONFIG_TEST_USBH_SERIAL
  412. int
  413. prompt "demo for test serial, cannot enable this demo, we have used serial framework instead"
  414. default 0
  415. depends on PKG_CHERRYUSB_HOST_CDC_ACM || PKG_CHERRYUSB_HOST_FTDI || PKG_CHERRYUSB_HOST_CH34X || PKG_CHERRYUSB_HOST_CP210X || PKG_CHERRYUSB_HOST_PL2303
  416. config CONFIG_TEST_USBH_HID
  417. int
  418. prompt "demo for test hid"
  419. default 0
  420. depends on PKG_CHERRYUSB_HOST_HID
  421. config CONFIG_TEST_USBH_MSC
  422. int
  423. prompt "demo for test msc, cannot enable this demo, we have used dfs instead"
  424. default 0
  425. depends on PKG_CHERRYUSB_HOST_MSC
  426. endmenu
  427. endif
  428. config PKG_CHERRYUSB_PATH
  429. string
  430. default "/packages/system/CherryUSB"
  431. choice
  432. prompt "Version"
  433. default PKG_USING_CHERRYUSB_V010503
  434. help
  435. Select the package version
  436. config PKG_USING_CHERRYUSB_LATEST_VERSION
  437. bool "latest"
  438. config PKG_USING_CHERRYUSB_V010502
  439. bool "v1.5.3"
  440. config PKG_USING_CHERRYUSB_V010502
  441. bool "v1.5.2"
  442. config PKG_USING_CHERRYUSB_V010501
  443. bool "v1.5.1"
  444. config PKG_USING_CHERRYUSB_V010500
  445. bool "v1.5.0"
  446. config PKG_USING_CHERRYUSB_V010403
  447. bool "v1.4.3"
  448. config PKG_USING_CHERRYUSB_V010301
  449. bool "v1.3.1"
  450. config PKG_USING_CHERRYUSB_V010200
  451. bool "v1.2.0"
  452. config PKG_USING_CHERRYUSB_V001002
  453. bool "v0.10.2"
  454. endchoice
  455. config PKG_CHERRYUSB_VER
  456. string
  457. default "latest" if PKG_USING_CHERRYUSB_LATEST_VERSION
  458. default "v1.5.3" if PKG_USING_CHERRYUSB_V010503
  459. default "v1.5.2" if PKG_USING_CHERRYUSB_V010502
  460. default "v1.5.1" if PKG_USING_CHERRYUSB_V010501
  461. default "v1.5.0" if PKG_USING_CHERRYUSB_V010500
  462. default "v1.4.3" if PKG_USING_CHERRYUSB_V010403
  463. default "v1.3.1" if PKG_USING_CHERRYUSB_V010301
  464. default "v1.2.0" if PKG_USING_CHERRYUSB_V010200
  465. default "v0.10.2" if PKG_USING_CHERRYUSB_V001002
  466. endif