Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. menu "Device Drivers"
  2. config RT_USING_DEVICE_IPC
  3. bool "Using device drivers IPC"
  4. default y
  5. if RT_USING_DEVICE_IPC
  6. config RT_PIPE_BUFSZ
  7. int "Set pipe buffer size"
  8. default 512
  9. endif
  10. config RT_USING_SERIAL
  11. bool "Using serial device drivers"
  12. select RT_USING_DEVICE_IPC
  13. select RT_USING_DEVICE
  14. default y
  15. if RT_USING_SERIAL
  16. config RT_SERIAL_USING_DMA
  17. bool "Enable serial DMA mode"
  18. default y
  19. endif
  20. config RT_USING_CAN
  21. bool "Using CAN device drivers"
  22. default n
  23. if RT_USING_CAN
  24. config RT_CAN_USING_HDR
  25. bool "Enable CAN hardware filter"
  26. default y
  27. endif
  28. config RT_USING_HWTIMER
  29. bool "Using hardware timer device drivers"
  30. default n
  31. config RT_USING_CPUTIME
  32. bool "Enable CPU time for high resolution clock counter"
  33. default n
  34. help
  35. When enable this option, the BSP should provide a rt_clock_cputime_ops
  36. for CPU time by:
  37. const static struct rt_clock_cputime_ops _ops = {...};
  38. clock_cpu_setops(&_ops);
  39. Then user can use high resolution clock counter with:
  40. ts1 = clock_cpu_gettime();
  41. ts2 = clock_cpu_gettime();
  42. /* and get the ms of delta tick with API: */
  43. ms_tick = clock_cpu_millisecond(t2 - t1);
  44. us_tick = clock_cpu_microsecond(t2 - t1);
  45. if RT_USING_CPUTIME
  46. config RT_USING_CPUTIME_CORTEXM
  47. bool "Use DWT for CPU time"
  48. default y
  49. depends on ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
  50. help
  51. Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use
  52. the cycle counter in DWT for CPU time.
  53. endif
  54. config RT_USING_I2C
  55. bool "Using I2C device drivers"
  56. default n
  57. if RT_USING_I2C
  58. config RT_USING_I2C_BITOPS
  59. bool "Use GPIO to simulate I2C"
  60. default y
  61. endif
  62. config RT_USING_PIN
  63. bool "Using generic GPIO device drivers"
  64. default y
  65. config RT_USING_ADC
  66. bool "Using ADC device drivers"
  67. default n
  68. config RT_USING_PWM
  69. bool "Using PWM device drivers"
  70. default n
  71. config RT_USING_MTD_NOR
  72. bool "Using MTD Nor Flash device drivers"
  73. default n
  74. config RT_USING_MTD_NAND
  75. bool "Using MTD Nand Flash device drivers"
  76. default n
  77. if RT_USING_MTD_NAND
  78. config RT_MTD_NAND_DEBUG
  79. bool "Enable MTD Nand operations debug information"
  80. default n
  81. endif
  82. config RT_USING_MTD
  83. bool "Using Memory Technology Device (MTD)"
  84. default n
  85. if RT_USING_MTD
  86. config MTD_USING_NOR
  87. bool "Using MTD Nor Flash device"
  88. default n
  89. config MTD_USING_NAND
  90. bool "Using MTD Nand Flash device"
  91. default n
  92. endif
  93. config RT_USING_PM
  94. bool "Using Power Management device drivers"
  95. default n
  96. config RT_USING_RTC
  97. bool "Using RTC device drivers"
  98. default n
  99. if RT_USING_RTC
  100. config RT_USING_SOFT_RTC
  101. bool "Using software simulation RTC device"
  102. default n
  103. config RTC_SYNC_USING_NTP
  104. bool "Using NTP auto sync RTC time"
  105. depends on PKG_NETUTILS_NTP
  106. default y
  107. if RTC_SYNC_USING_NTP
  108. config RTC_NTP_FIRST_SYNC_DELAY
  109. int "NTP first sync delay time(second) for network connect"
  110. default 30
  111. config RTC_NTP_SYNC_PERIOD
  112. int "NTP auto sync period(second)"
  113. default 3600
  114. endif
  115. endif
  116. config RT_USING_SDIO
  117. bool "Using SD/MMC device drivers"
  118. default n
  119. if RT_USING_SDIO
  120. config RT_SDIO_STACK_SIZE
  121. int "The stack size for sdio irq thread"
  122. default 512
  123. config RT_SDIO_THREAD_PRIORITY
  124. int "The priority level value of sdio irq thread"
  125. default 15
  126. config RT_MMCSD_STACK_SIZE
  127. int "The stack size for mmcsd thread"
  128. default 1024
  129. config RT_MMCSD_THREAD_PREORITY
  130. int "The priority level value of mmcsd thread"
  131. default 22
  132. config RT_MMCSD_MAX_PARTITION
  133. int "mmcsd max partition"
  134. default 16
  135. config RT_SDIO_DEBUG
  136. bool "Enable SDIO debug log output"
  137. default n
  138. endif
  139. config RT_USING_SPI
  140. bool "Using SPI Bus/Device device drivers"
  141. default n
  142. if RT_USING_SPI
  143. config RT_USING_QSPI
  144. bool "Enable QSPI mode"
  145. default n
  146. config RT_USING_SPI_MSD
  147. bool "Using SD/TF card driver with spi"
  148. select RT_USING_DFS
  149. default n
  150. config RT_USING_SFUD
  151. bool "Using Serial Flash Universal Driver"
  152. default n
  153. if RT_USING_SFUD
  154. config RT_SFUD_USING_SFDP
  155. bool "Using auto probe flash JEDEC SFDP parameter"
  156. default y
  157. config RT_SFUD_USING_FLASH_INFO_TABLE
  158. bool "Using defined supported flash chip information table"
  159. default y
  160. config RT_SFUD_USING_QSPI
  161. bool "Using QSPI mode support"
  162. select RT_USING_QSPI
  163. default n
  164. config RT_DEBUG_SFUD
  165. bool "Show more SFUD debug information"
  166. default n
  167. endif
  168. config RT_USING_W25QXX
  169. bool "Using W25QXX SPI NorFlash"
  170. default n
  171. config RT_USING_GD
  172. bool "Using GD SPI NorFlash"
  173. default n
  174. config RT_USING_ENC28J60
  175. bool "Using ENC28J60 SPI Ethernet network interface"
  176. select RT_USING_LWIP
  177. default n
  178. config RT_USING_SPI_WIFI
  179. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  180. select RT_USING_LWIP
  181. default n
  182. endif
  183. config RT_USING_WDT
  184. bool "Using Watch Dog device drivers"
  185. default n
  186. config RT_USING_AUDIO
  187. bool "Using Audio device drivers"
  188. default n
  189. menu "Using WiFi"
  190. config RT_USING_WIFI
  191. bool "Using Wi-Fi framework"
  192. default n
  193. if RT_USING_WIFI
  194. config RT_WLAN_DEVICE_STA_NAME
  195. string "The WiFi device name for station"
  196. default "wlan0"
  197. config RT_WLAN_DEVICE_AP_NAME
  198. string "The WiFi device name for ap"
  199. default "wlan1"
  200. config RT_WLAN_DEFAULT_PROT
  201. string "Default transport protocol"
  202. default "lwip"
  203. config RT_WLAN_SCAN_WAIT_MS
  204. int "Set scan timeout time(ms)"
  205. default 10000
  206. config RT_WLAN_CONNECT_WAIT_MS
  207. int "Set connect timeout time(ms)"
  208. default 10000
  209. config RT_WLAN_SSID_MAX_LENGTH
  210. int "SSID name maximum length"
  211. default 32
  212. config RT_WLAN_PASSWORD_MAX_LENGTH
  213. int "Maximum password length"
  214. default 32
  215. config RT_WLAN_SCAN_SORT
  216. bool "Automatic sorting of scan results"
  217. default y
  218. config RT_WLAN_CFG_INFO_MAX
  219. int "Maximum number of WiFi information automatically saved"
  220. default 3
  221. config RT_WLAN_WORKQUEUE_THREAD_NAME
  222. string "WiFi work queue thread name"
  223. default "wlan_job"
  224. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  225. int "wifi work queue thread size"
  226. default 2048
  227. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  228. int "WiFi work queue thread priority"
  229. default 22
  230. config RT_WLAN_DEV_EVENT_NUM
  231. int "Maximum number of driver events"
  232. default 2
  233. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  234. bool "Forced use of PBUF transmission"
  235. default n
  236. menuconfig RT_WLAN_DEBUG
  237. bool "Enable WLAN Debugging Options"
  238. default n
  239. if RT_WLAN_DEBUG
  240. config RT_WLAN_CMD_DEBUG
  241. bool "Enable Debugging of wlan_cmd.c"
  242. default n
  243. config RT_WLAN_MGNT_DEBUG
  244. bool "Enable Debugging of wlan_mgnt.c"
  245. default n
  246. config RT_WLAN_DEV_DEBUG
  247. bool "Enable Debugging of wlan_dev.c"
  248. default n
  249. config RT_WLAN_PROT_DEBUG
  250. bool "Enable Debugging of wlan_prot.c"
  251. default n
  252. config RT_WLAN_CFG_DEBUG
  253. bool "Enable Debugging of wlan_cfg.c"
  254. default n
  255. config RT_WLAN_LWIP_DEBUG
  256. bool "Enable Debugging of wlan_lwip.c"
  257. default n
  258. endif
  259. endif
  260. endmenu
  261. menu "Using USB"
  262. config RT_USING_USB_HOST
  263. bool "Using USB host"
  264. default n
  265. if RT_USING_USB_HOST
  266. config RT_USBH_MSTORAGE
  267. bool "Enable Udisk Drivers"
  268. default n
  269. if RT_USBH_MSTORAGE
  270. config UDISK_MOUNTPOINT
  271. string "Udisk mount dir"
  272. default "/"
  273. endif
  274. endif
  275. config RT_USING_USB_DEVICE
  276. bool "Using USB device"
  277. default n
  278. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  279. config RT_USBD_THREAD_STACK_SZ
  280. int "usb thread stack size"
  281. default 4096
  282. endif
  283. if RT_USING_USB_DEVICE
  284. config USB_VENDOR_ID
  285. hex "USB Vendor ID"
  286. default 0x0FFE
  287. config USB_PRODUCT_ID
  288. hex "USB Product ID"
  289. default 0x0001
  290. config RT_USB_DEVICE_COMPOSITE
  291. bool "Enable composite device"
  292. default n
  293. choice
  294. prompt "Device type"
  295. default _RT_USB_DEVICE_NONE
  296. depends on !RT_USB_DEVICE_COMPOSITE
  297. config _RT_USB_DEVICE_NONE
  298. bool "Using custom class by register interface"
  299. select RT_USB_DEVICE_NONE
  300. config _RT_USB_DEVICE_CDC
  301. bool "Enable to use device as CDC device"
  302. select RT_USB_DEVICE_CDC
  303. config _RT_USB_DEVICE_MSTORAGE
  304. bool "Enable to use device as Mass Storage device"
  305. select RT_USB_DEVICE_MSTORAGE
  306. config _RT_USB_DEVICE_HID
  307. bool "Enable to use device as HID device"
  308. select RT_USB_DEVICE_HID
  309. config _RT_USB_DEVICE_RNDIS
  310. bool "Enable to use device as rndis device"
  311. select RT_USB_DEVICE_RNDIS
  312. depends on RT_USING_LWIP
  313. config _RT_USB_DEVICE_ECM
  314. bool "Enable to use device as ecm device"
  315. select RT_USB_DEVICE_ECM
  316. depends on RT_USING_LWIP
  317. config _RT_USB_DEVICE_WINUSB
  318. bool "Enable to use device as winusb device"
  319. select RT_USB_DEVICE_WINUSB
  320. endchoice
  321. if RT_USB_DEVICE_COMPOSITE
  322. config RT_USB_DEVICE_CDC
  323. bool "Enable to use device as CDC device"
  324. default n
  325. config RT_USB_DEVICE_NONE
  326. bool
  327. default y
  328. config RT_USB_DEVICE_MSTORAGE
  329. bool "Enable to use device as Mass Storage device"
  330. default n
  331. config RT_USB_DEVICE_HID
  332. bool "Enable to use device as HID device"
  333. default n
  334. config RT_USB_DEVICE_RNDIS
  335. bool "Enable to use device as rndis device"
  336. default n
  337. depends on RT_USING_LWIP
  338. config RT_USB_DEVICE_ECM
  339. bool "Enable to use device as ecm device"
  340. default n
  341. depends on RT_USING_LWIP
  342. config RT_USB_DEVICE_WINUSB
  343. bool "Enable to use device as winusb device"
  344. default n
  345. endif
  346. if RT_USB_DEVICE_CDC
  347. config RT_VCOM_TASK_STK_SIZE
  348. int "virtual com thread stack size"
  349. default 512
  350. config RT_VCOM_TX_USE_DMA
  351. bool "Enable to use dma for vcom tx"
  352. default n
  353. config RT_VCOM_SERNO
  354. string "serial number of virtual com"
  355. default "32021919830108"
  356. config RT_VCOM_SER_LEN
  357. int "serial number length of virtual com"
  358. default 14
  359. config RT_VCOM_TX_TIMEOUT
  360. int "tx timeout(ticks) of virtual com"
  361. default 1000
  362. endif
  363. if RT_USB_DEVICE_WINUSB
  364. config RT_WINUSB_GUID
  365. string "Guid for winusb"
  366. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  367. endif
  368. if RT_USB_DEVICE_MSTORAGE
  369. config RT_USB_MSTORAGE_DISK_NAME
  370. string "msc class disk name"
  371. default "flash0"
  372. endif
  373. if RT_USB_DEVICE_HID
  374. config RT_USB_DEVICE_HID_KEYBOARD
  375. bool "Use to HID device as Keyboard"
  376. default n
  377. if RT_USB_DEVICE_HID_KEYBOARD
  378. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  379. int "Number of Keyboard(max 3)"
  380. default 1
  381. range 1 3
  382. endif
  383. config RT_USB_DEVICE_HID_MOUSE
  384. bool "Use to HID device as Mouse"
  385. default n
  386. config RT_USB_DEVICE_HID_GENERAL
  387. bool "Use to HID device as General HID device"
  388. default y
  389. if RT_USB_DEVICE_HID_GENERAL
  390. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  391. int "General HID device out report length"
  392. default 63
  393. range 0 63
  394. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  395. int "General HID device in report length"
  396. default 63
  397. range 0 63
  398. endif
  399. config RT_USB_DEVICE_HID_MEDIA
  400. bool "Use to HID device as media keyboard"
  401. default y
  402. endif
  403. endif
  404. endmenu
  405. endmenu