|
| 1 | +# Kconfig file for package CherryUSB |
| 2 | +menuconfig RT_USING_CHERRYUSB |
| 3 | + bool "Using USB with CherryUSB" |
| 4 | + default n |
| 5 | + |
| 6 | +if RT_USING_CHERRYUSB |
| 7 | + |
| 8 | + menuconfig RT_CHERRYUSB_DEVICE |
| 9 | + bool "Enable usb device mode" |
| 10 | + default n |
| 11 | + |
| 12 | + if RT_CHERRYUSB_DEVICE |
| 13 | + choice |
| 14 | + prompt "Select usb device speed" |
| 15 | + default RT_CHERRYUSB_DEVICE_SPEED_FS |
| 16 | + config RT_CHERRYUSB_DEVICE_SPEED_FS |
| 17 | + bool "FS" |
| 18 | + config RT_CHERRYUSB_DEVICE_SPEED_HS |
| 19 | + bool "HS" |
| 20 | + config RT_CHERRYUSB_DEVICE_SPEED_AUTO |
| 21 | + bool "AUTO" |
| 22 | + endchoice |
| 23 | + |
| 24 | + choice |
| 25 | + prompt "Select usb device ip, and some ip need config in usb_config.h, please check" |
| 26 | + default RT_CHERRYUSB_DEVICE_CUSTOM |
| 27 | + config RT_CHERRYUSB_DEVICE_CUSTOM |
| 28 | + bool "CUSTOM (Implement it yourself)" |
| 29 | + config RT_CHERRYUSB_DEVICE_FSDEV_ST |
| 30 | + bool "fsdev_st" |
| 31 | + config RT_CHERRYUSB_DEVICE_FSDEV_CUSTOM |
| 32 | + bool "fsdev_custom" |
| 33 | + config RT_CHERRYUSB_DEVICE_DWC2_ST |
| 34 | + bool "dwc2_st" |
| 35 | + config RT_CHERRYUSB_DEVICE_DWC2_ESP |
| 36 | + bool "dwc2_esp" |
| 37 | + config RT_CHERRYUSB_DEVICE_DWC2_KENDRYTE |
| 38 | + bool "dwc2_kendryte" |
| 39 | + config RT_CHERRYUSB_DEVICE_DWC2_AT |
| 40 | + bool "dwc2_at" |
| 41 | + config RT_CHERRYUSB_DEVICE_DWC2_HC |
| 42 | + bool "dwc2_hc" |
| 43 | + config RT_CHERRYUSB_DEVICE_DWC2_GD |
| 44 | + bool "dwc2_gd" |
| 45 | + config RT_CHERRYUSB_DEVICE_DWC2_CUSTOM |
| 46 | + bool "dwc2_custom" |
| 47 | + config RT_CHERRYUSB_DEVICE_MUSB_ES |
| 48 | + bool "musb_es" |
| 49 | + config RT_CHERRYUSB_DEVICE_MUSB_SUNXI |
| 50 | + bool "musb_sunxi" |
| 51 | + config RT_CHERRYUSB_DEVICE_MUSB_BK |
| 52 | + bool "musb_bk" |
| 53 | + config RT_CHERRYUSB_DEVICE_MUSB_CUSTOM |
| 54 | + bool "musb_custom" |
| 55 | + config RT_CHERRYUSB_DEVICE_CHIPIDEA_MCX |
| 56 | + bool "chipidea_mcx" |
| 57 | + config RT_CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM |
| 58 | + bool "chipidea_custom" |
| 59 | + config RT_CHERRYUSB_DEVICE_KINETIS_MCX |
| 60 | + bool "kinetis_mcx" |
| 61 | + config RT_CHERRYUSB_DEVICE_KINETIS_MM32 |
| 62 | + bool "kinetis_mm32" |
| 63 | + config RT_CHERRYUSB_DEVICE_KINETIS_CUSTOM |
| 64 | + bool "kinetis_custom" |
| 65 | + config RT_CHERRYUSB_DEVICE_BL |
| 66 | + bool "bouffalo" |
| 67 | + config RT_CHERRYUSB_DEVICE_HPM |
| 68 | + bool "hpm" |
| 69 | + config RT_CHERRYUSB_DEVICE_AIC |
| 70 | + bool "aic" |
| 71 | + config RT_CHERRYUSB_DEVICE_RP2040 |
| 72 | + bool "rp2040" |
| 73 | + config RT_CHERRYUSB_DEVICE_CH32 |
| 74 | + bool "ch32" |
| 75 | + config RT_CHERRYUSB_DEVICE_PUSB2 |
| 76 | + bool "pusb2" |
| 77 | + config RT_CHERRYUSB_DEVICE_NRF5X |
| 78 | + bool "nrf5x" |
| 79 | + endchoice |
| 80 | + |
| 81 | + config RT_CHERRYUSB_DEVICE_CDC_ACM |
| 82 | + bool |
| 83 | + prompt "Enable usb cdc acm device" |
| 84 | + default n |
| 85 | + |
| 86 | + config RT_CHERRYUSB_DEVICE_HID |
| 87 | + bool |
| 88 | + prompt "Enable usb hid device" |
| 89 | + default n |
| 90 | + |
| 91 | + config RT_CHERRYUSB_DEVICE_MSC |
| 92 | + bool |
| 93 | + prompt "Enable usb msc device" |
| 94 | + default n |
| 95 | + |
| 96 | + config RT_CHERRYUSB_DEVICE_AUDIO |
| 97 | + bool |
| 98 | + prompt "Enable usb audio device" |
| 99 | + default n |
| 100 | + |
| 101 | + config RT_CHERRYUSB_DEVICE_VIDEO |
| 102 | + bool |
| 103 | + prompt "Enable usb video device" |
| 104 | + default n |
| 105 | + |
| 106 | + config RT_CHERRYUSB_DEVICE_CDC_RNDIS |
| 107 | + bool |
| 108 | + prompt "Enable usb cdc rndis device" |
| 109 | + default n |
| 110 | + |
| 111 | + config RT_CHERRYUSB_DEVICE_CDC_ECM |
| 112 | + bool |
| 113 | + prompt "Enable usb cdc ecm device" |
| 114 | + default n |
| 115 | + |
| 116 | + config RT_CHERRYUSB_DEVICE_CDC_NCM |
| 117 | + bool |
| 118 | + prompt "Enable usb cdc ncm device" |
| 119 | + default n |
| 120 | + |
| 121 | + config RT_CHERRYUSB_DEVICE_DFU |
| 122 | + bool |
| 123 | + prompt "Enable usb dfu device" |
| 124 | + default n |
| 125 | + |
| 126 | + choice |
| 127 | + prompt "Select usb device template" |
| 128 | + default RT_CHERRYUSB_DEVICE_TEMPLATE_NONE |
| 129 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_NONE |
| 130 | + bool "none (Implement it yourself)" |
| 131 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM |
| 132 | + bool "cdc_acm" |
| 133 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_MSC |
| 134 | + bool "msc_ram" |
| 135 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV |
| 136 | + bool "msc_blkdev" |
| 137 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_HID_KEYBOARD |
| 138 | + bool "hid_keyboard" |
| 139 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_HID_MOUSE |
| 140 | + bool "hid_mouse" |
| 141 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_HID_CUSTOM |
| 142 | + bool "hid_custom" |
| 143 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_VIDEO |
| 144 | + bool "video" |
| 145 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V1_MIC_SPEAKER |
| 146 | + bool "audio_v1_mic_speaker_multichan" |
| 147 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_AUDIO_V2_MIC_SPEAKER |
| 148 | + bool "audio_v2_mic_speaker_multichan" |
| 149 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_RNDIS |
| 150 | + bool "cdc_rndis" |
| 151 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ECM |
| 152 | + bool "cdc_ecm" |
| 153 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_NCM |
| 154 | + bool "cdc_ncm" |
| 155 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC |
| 156 | + bool "cdc_acm_msc" |
| 157 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC_HID |
| 158 | + bool "cdc_acm_msc_hid" |
| 159 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV1 |
| 160 | + bool "winusbv1" |
| 161 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_CDC |
| 162 | + bool "winusbv2_cdc" |
| 163 | + config RT_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_HID |
| 164 | + bool "winusbv2_hid" |
| 165 | + endchoice |
| 166 | + |
| 167 | + config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME |
| 168 | + string "usb device msc block device name" |
| 169 | + depends on RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV |
| 170 | + default "sd0" |
| 171 | + |
| 172 | + endif |
| 173 | + |
| 174 | + menuconfig RT_CHERRYUSB_HOST |
| 175 | + bool "Enable usb host mode" |
| 176 | + default n |
| 177 | + |
| 178 | + if RT_CHERRYUSB_HOST |
| 179 | + choice |
| 180 | + prompt "Select usb host ip, and some ip need config in usb_config.h, please check" |
| 181 | + default RT_CHERRYUSB_HOST_CUSTOM |
| 182 | + config RT_CHERRYUSB_HOST_CUSTOM |
| 183 | + bool "CUSTOM (Implement it yourself)" |
| 184 | + config RT_CHERRYUSB_HOST_EHCI_BL |
| 185 | + bool "ehci_bouffalo" |
| 186 | + config RT_CHERRYUSB_HOST_EHCI_HPM |
| 187 | + bool "ehci_hpm" |
| 188 | + config RT_CHERRYUSB_HOST_EHCI_AIC |
| 189 | + bool "ehci_aic" |
| 190 | + config RT_CHERRYUSB_HOST_EHCI_MCX |
| 191 | + bool "ehci_mcx" |
| 192 | + config RT_CHERRYUSB_HOST_EHCI_NUC980 |
| 193 | + bool "ehci_nuc980" |
| 194 | + config RT_CHERRYUSB_HOST_EHCI_MA35D0 |
| 195 | + bool "ehci_ma35d0" |
| 196 | + config RT_CHERRYUSB_HOST_EHCI_CUSTOM |
| 197 | + bool "ehci_custom" |
| 198 | + config RT_CHERRYUSB_HOST_DWC2_ST |
| 199 | + bool "dwc2_st" |
| 200 | + config RT_CHERRYUSB_HOST_DWC2_ESP |
| 201 | + bool "dwc2_esp" |
| 202 | + config RT_CHERRYUSB_HOST_DWC2_KENDRYTE |
| 203 | + bool "dwc2_kendryte" |
| 204 | + config RT_CHERRYUSB_HOST_DWC2_HC |
| 205 | + bool "dwc2_hc" |
| 206 | + config RT_CHERRYUSB_HOST_DWC2_CUSTOM |
| 207 | + bool "dwc2_custom" |
| 208 | + config RT_CHERRYUSB_HOST_MUSB_ES |
| 209 | + bool "musb_es" |
| 210 | + config RT_CHERRYUSB_HOST_MUSB_SUNXI |
| 211 | + bool "musb_sunxi" |
| 212 | + config RT_CHERRYUSB_HOST_MUSB_BK |
| 213 | + bool "musb_bk" |
| 214 | + config RT_CHERRYUSB_HOST_MUSB_CUSTOM |
| 215 | + bool "musb_custom" |
| 216 | + config RT_CHERRYUSB_HOST_PUSB2 |
| 217 | + bool "pusb2" |
| 218 | + config RT_CHERRYUSB_HOST_XHCI |
| 219 | + bool "xhci" |
| 220 | + config RT_CHERRYUSB_HOST_RP2040 |
| 221 | + bool "rp2040" |
| 222 | + endchoice |
| 223 | + |
| 224 | + config RT_CHERRYUSB_HOST_CDC_ACM |
| 225 | + bool |
| 226 | + prompt "Enable usb cdc acm driver" |
| 227 | + default n |
| 228 | + |
| 229 | + config RT_CHERRYUSB_HOST_HID |
| 230 | + bool |
| 231 | + prompt "Enable usb hid driver" |
| 232 | + default n |
| 233 | + |
| 234 | + config RT_CHERRYUSB_HOST_MSC |
| 235 | + bool |
| 236 | + prompt "Enable usb msc driver" |
| 237 | + default n |
| 238 | + select RT_USING_DFS |
| 239 | + select RT_USING_DFS_ELMFAT |
| 240 | + |
| 241 | + config RT_CHERRYUSB_HOST_CDC_ECM |
| 242 | + bool |
| 243 | + prompt "Enable usb cdc ecm driver" |
| 244 | + select RT_USING_LWIP |
| 245 | + select CONFIG_USBHOST_PLATFORM_CDC_ECM |
| 246 | + default n |
| 247 | + |
| 248 | + config RT_CHERRYUSB_HOST_CDC_RNDIS |
| 249 | + bool |
| 250 | + prompt "Enable usb rndis driver" |
| 251 | + select RT_USING_LWIP |
| 252 | + select CONFIG_USBHOST_PLATFORM_CDC_RNDIS |
| 253 | + default n |
| 254 | + |
| 255 | + config RT_CHERRYUSB_HOST_CDC_NCM |
| 256 | + bool |
| 257 | + prompt "Enable usb cdc ncm driver" |
| 258 | + select RT_USING_LWIP |
| 259 | + select CONFIG_USBHOST_PLATFORM_CDC_NCM |
| 260 | + default n |
| 261 | + |
| 262 | + config RT_CHERRYUSB_HOST_VIDEO |
| 263 | + bool |
| 264 | + prompt "Enable usb video driver, it is commercial charge" |
| 265 | + default n |
| 266 | + |
| 267 | + config RT_CHERRYUSB_HOST_AUDIO |
| 268 | + bool |
| 269 | + prompt "Enable usb audio driver, it is commercial charge" |
| 270 | + default n |
| 271 | + |
| 272 | + config RT_CHERRYUSB_HOST_BLUETOOTH |
| 273 | + bool |
| 274 | + prompt "Enable usb bluetooth driver" |
| 275 | + default n |
| 276 | + |
| 277 | + config RT_CHERRYUSB_HOST_ASIX |
| 278 | + bool |
| 279 | + prompt "Enable usb asix driver" |
| 280 | + select RT_USING_LWIP |
| 281 | + select CONFIG_USBHOST_PLATFORM_ASIX |
| 282 | + default n |
| 283 | + |
| 284 | + config RT_CHERRYUSB_HOST_RTL8152 |
| 285 | + bool |
| 286 | + prompt "Enable usb rtl8152 driver" |
| 287 | + select RT_USING_LWIP |
| 288 | + select CONFIG_USBHOST_PLATFORM_RTL8152 |
| 289 | + default n |
| 290 | + |
| 291 | + config RT_CHERRYUSB_HOST_FTDI |
| 292 | + bool |
| 293 | + prompt "Enable usb ftdi driver" |
| 294 | + default n |
| 295 | + |
| 296 | + config RT_CHERRYUSB_HOST_CH34X |
| 297 | + bool |
| 298 | + prompt "Enable usb ch34x driver" |
| 299 | + default n |
| 300 | + |
| 301 | + config RT_CHERRYUSB_HOST_CP210X |
| 302 | + bool |
| 303 | + prompt "Enable usb cp210x driver" |
| 304 | + default n |
| 305 | + |
| 306 | + config RT_CHERRYUSB_HOST_PL2303 |
| 307 | + bool |
| 308 | + prompt "Enable usb pl2303 driver" |
| 309 | + default n |
| 310 | + |
| 311 | + config CONFIG_USBHOST_PLATFORM_CDC_ECM |
| 312 | + bool |
| 313 | + |
| 314 | + config CONFIG_USBHOST_PLATFORM_CDC_RNDIS |
| 315 | + bool |
| 316 | + |
| 317 | + config CONFIG_USBHOST_PLATFORM_CDC_NCM |
| 318 | + bool |
| 319 | + |
| 320 | + config CONFIG_USBHOST_PLATFORM_ASIX |
| 321 | + bool |
| 322 | + |
| 323 | + config CONFIG_USBHOST_PLATFORM_RTL8152 |
| 324 | + bool |
| 325 | + |
| 326 | + config RT_LWIP_PBUF_POOL_BUFSIZE |
| 327 | + int "The size of each pbuf in the pbuf pool" |
| 328 | + range 1500 2000 |
| 329 | + default 1600 |
| 330 | + |
| 331 | + config CONFIG_USB_DFS_MOUNT_POINT |
| 332 | + string "usb host dfs mount point" |
| 333 | + depends on RT_CHERRYUSB_HOST_MSC |
| 334 | + default "/" |
| 335 | + |
| 336 | + config RT_CHERRYUSB_HOST_TEMPLATE |
| 337 | + bool |
| 338 | + prompt "Use usb host template" |
| 339 | + default n |
| 340 | + |
| 341 | + if RT_CHERRYUSB_HOST_TEMPLATE |
| 342 | + config TEST_USBH_CDC_ACM |
| 343 | + int |
| 344 | + prompt "demo for test cdc acm" |
| 345 | + default 0 |
| 346 | + depends on CHERRYUSB_HOST_CDC_ACM |
| 347 | + config TEST_USBH_HID |
| 348 | + int |
| 349 | + prompt "demo for test hid" |
| 350 | + default 0 |
| 351 | + depends on CHERRYUSB_HOST_HID |
| 352 | + endif |
| 353 | + endif |
| 354 | + |
| 355 | +endif |
0 commit comments