Kconfig 15 KB

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