Kconfig 15 KB

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