1menu "Using USB legacy version" 2 config RT_USING_USB 3 bool 4 default n 5 6 config RT_USING_USB_HOST 7 bool "Using USB host" 8 default n 9 select RT_USING_USB 10 11 if RT_USING_USB_HOST 12 config RT_USBH_MSTORAGE 13 bool "Enable Udisk Drivers" 14 default n 15 if RT_USBH_MSTORAGE 16 config UDISK_MOUNTPOINT 17 string "Udisk mount dir" 18 default "/" 19 endif 20 config RT_USBH_HID 21 bool "Enable HID Drivers" 22 default n 23 if RT_USBH_HID 24 config RT_USBH_HID_MOUSE 25 bool "Enable HID mouse protocol" 26 default n 27 config RT_USBH_HID_KEYBOARD 28 bool "Enable HID keyboard protocol" 29 default n 30 endif 31 endif 32 config RT_USING_USB_DEVICE 33 bool "Using USB device" 34 default n 35 select RT_USING_USB 36 37 if RT_USING_USB_DEVICE || RT_USING_USB_HOST 38 config RT_USBD_THREAD_STACK_SZ 39 int "usb thread stack size" 40 default 4096 41 endif 42 if RT_USING_USB_DEVICE 43 config USB_VENDOR_ID 44 hex "USB Vendor ID" 45 default 0x0FFE 46 config USB_PRODUCT_ID 47 hex "USB Product ID" 48 default 0x0001 49 50 config RT_USB_DEVICE_COMPOSITE 51 bool "Enable composite device" 52 default n 53 choice 54 prompt "Device type" 55 default _RT_USB_DEVICE_NONE 56 depends on !RT_USB_DEVICE_COMPOSITE 57 config _RT_USB_DEVICE_NONE 58 bool "Using custom class by register interface" 59 select RT_USB_DEVICE_NONE 60 config _RT_USB_DEVICE_CDC 61 bool "Enable to use device as CDC device" 62 select RT_USB_DEVICE_CDC 63 config _RT_USB_DEVICE_MSTORAGE 64 bool "Enable to use device as Mass Storage device" 65 select RT_USB_DEVICE_MSTORAGE 66 config _RT_USB_DEVICE_HID 67 bool "Enable to use device as HID device" 68 select RT_USB_DEVICE_HID 69 config _RT_USB_DEVICE_RNDIS 70 bool "Enable to use device as rndis device" 71 select RT_USB_DEVICE_RNDIS 72 depends on RT_USING_LWIP 73 config _RT_USB_DEVICE_ECM 74 bool "Enable to use device as ecm device" 75 select RT_USB_DEVICE_ECM 76 depends on RT_USING_LWIP 77 config _RT_USB_DEVICE_WINUSB 78 bool "Enable to use device as winusb device" 79 select RT_USB_DEVICE_WINUSB 80 config _RT_USB_DEVICE_AUDIO 81 bool "Enable to use device as audio device" 82 select RT_USB_DEVICE_AUDIO 83 endchoice 84 if RT_USB_DEVICE_COMPOSITE 85 config RT_USB_DEVICE_CDC 86 bool "Enable to use device as CDC device" 87 default n 88 config RT_USB_DEVICE_NONE 89 bool 90 default y 91 config RT_USB_DEVICE_MSTORAGE 92 bool "Enable to use device as Mass Storage device" 93 default n 94 config RT_USB_DEVICE_HID 95 bool "Enable to use device as HID device" 96 default n 97 config RT_USB_DEVICE_RNDIS 98 bool "Enable to use device as rndis device" 99 default n 100 depends on RT_USING_LWIP 101 config RT_USB_DEVICE_ECM 102 bool "Enable to use device as ecm device" 103 default n 104 depends on RT_USING_LWIP 105 config RT_USB_DEVICE_WINUSB 106 bool "Enable to use device as winusb device" 107 default n 108 config RT_USB_DEVICE_AUDIO 109 bool "Enable to use device as audio device" 110 default n 111 endif 112 if RT_USB_DEVICE_CDC 113 config RT_VCOM_TASK_STK_SIZE 114 int "virtual com thread stack size" 115 default 512 116 config RT_CDC_RX_BUFSIZE 117 int "virtual com rx buffer size" 118 default 128 119 config RT_VCOM_TX_USE_DMA 120 bool "Enable to use dma for vcom tx" 121 default n 122 config RT_VCOM_SERNO 123 string "serial number of virtual com" 124 default "32021919830108" 125 config RT_VCOM_SER_LEN 126 int "serial number length of virtual com" 127 default 14 128 config RT_VCOM_TX_TIMEOUT 129 int "tx timeout(ticks) of virtual com" 130 default 1000 131 endif 132 if RT_USB_DEVICE_WINUSB 133 config RT_WINUSB_GUID 134 string "Guid for winusb" 135 default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}" 136 endif 137 if RT_USB_DEVICE_MSTORAGE 138 config RT_USB_MSTORAGE_DISK_NAME 139 string "msc class disk name" 140 default "flash0" 141 endif 142 143 if RT_USB_DEVICE_RNDIS 144 config RNDIS_DELAY_LINK_UP 145 bool "Delay linkup media connection" 146 select RT_USING_TIMER_SOFT 147 default n 148 endif 149 150 if RT_USB_DEVICE_HID 151 config RT_USB_DEVICE_HID_KEYBOARD 152 bool "Use to HID device as Keyboard" 153 default n 154 if RT_USB_DEVICE_HID_KEYBOARD 155 config RT_USB_DEVICE_HID_KEYBOARD_NUMBER 156 int "Number of Keyboard(max 3)" 157 default 1 158 range 1 3 159 endif 160 config RT_USB_DEVICE_HID_MOUSE 161 bool "Use to HID device as Mouse" 162 default n 163 config RT_USB_DEVICE_HID_GENERAL 164 bool "Use to HID device as General HID device" 165 default y 166 if RT_USB_DEVICE_HID_GENERAL 167 config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH 168 int "General HID device out report length" 169 default 63 170 range 0 63 171 172 config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH 173 int "General HID device in report length" 174 default 63 175 range 0 63 176 endif 177 config RT_USB_DEVICE_HID_MEDIA 178 bool "Use to HID device as media keyboard" 179 default y 180 endif 181 if RT_USB_DEVICE_AUDIO 182 config RT_USB_DEVICE_AUDIO_MIC 183 bool "Use usb mic device as audio device" 184 default n 185 if RT_USB_DEVICE_AUDIO_MIC 186 config RT_USBD_MIC_DEVICE_NAME 187 string "audio mic device name" 188 default "mic0" 189 endif 190 config RT_USB_DEVICE_AUDIO_SPEAKER 191 bool "Use usb speaker device as audio device" 192 default n 193 if RT_USB_DEVICE_AUDIO_SPEAKER 194 config RT_USBD_SPEAKER_DEVICE_NAME 195 string "audio speaker device name" 196 default "sound0" 197 endif 198 endif 199 endif 200endmenu 201