Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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_ALARM
  105. bool "Using RTC alarm"
  106. default n
  107. config RT_USING_SOFT_RTC
  108. bool "Using software simulation RTC device"
  109. default n
  110. config RTC_SYNC_USING_NTP
  111. bool "Using NTP auto sync RTC time"
  112. depends on PKG_NETUTILS_NTP
  113. default y
  114. if RTC_SYNC_USING_NTP
  115. config RTC_NTP_FIRST_SYNC_DELAY
  116. int "NTP first sync delay time(second) for network connect"
  117. default 30
  118. config RTC_NTP_SYNC_PERIOD
  119. int "NTP auto sync period(second)"
  120. default 3600
  121. endif
  122. endif
  123. config RT_USING_SDIO
  124. bool "Using SD/MMC device drivers"
  125. default n
  126. if RT_USING_SDIO
  127. config RT_SDIO_STACK_SIZE
  128. int "The stack size for sdio irq thread"
  129. default 512
  130. config RT_SDIO_THREAD_PRIORITY
  131. int "The priority level value of sdio irq thread"
  132. default 15
  133. config RT_MMCSD_STACK_SIZE
  134. int "The stack size for mmcsd thread"
  135. default 1024
  136. config RT_MMCSD_THREAD_PREORITY
  137. int "The priority level value of mmcsd thread"
  138. default 22
  139. config RT_MMCSD_MAX_PARTITION
  140. int "mmcsd max partition"
  141. default 16
  142. config RT_SDIO_DEBUG
  143. bool "Enable SDIO debug log output"
  144. default n
  145. endif
  146. config RT_USING_SPI
  147. bool "Using SPI Bus/Device device drivers"
  148. default n
  149. if RT_USING_SPI
  150. config RT_USING_QSPI
  151. bool "Enable QSPI mode"
  152. default n
  153. config RT_USING_SPI_MSD
  154. bool "Using SD/TF card driver with spi"
  155. select RT_USING_DFS
  156. default n
  157. config RT_USING_SFUD
  158. bool "Using Serial Flash Universal Driver"
  159. default n
  160. if RT_USING_SFUD
  161. config RT_SFUD_USING_SFDP
  162. bool "Using auto probe flash JEDEC SFDP parameter"
  163. default y
  164. config RT_SFUD_USING_FLASH_INFO_TABLE
  165. bool "Using defined supported flash chip information table"
  166. default y
  167. config RT_SFUD_USING_QSPI
  168. bool "Using QSPI mode support"
  169. select RT_USING_QSPI
  170. default n
  171. config RT_DEBUG_SFUD
  172. bool "Show more SFUD debug information"
  173. default n
  174. endif
  175. config RT_USING_W25QXX
  176. bool "Using W25QXX SPI NorFlash"
  177. default n
  178. config RT_USING_GD
  179. bool "Using GD SPI NorFlash"
  180. default n
  181. config RT_USING_ENC28J60
  182. bool "Using ENC28J60 SPI Ethernet network interface"
  183. select RT_USING_LWIP
  184. default n
  185. config RT_USING_SPI_WIFI
  186. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  187. select RT_USING_LWIP
  188. default n
  189. endif
  190. config RT_USING_WDT
  191. bool "Using Watch Dog device drivers"
  192. default n
  193. config RT_USING_AUDIO
  194. bool "Using Audio device drivers"
  195. default n
  196. config RT_USING_SENSOR
  197. bool "Using Sensor device drivers"
  198. select RT_USING_PIN
  199. default n
  200. if RT_USING_SENSOR
  201. config RT_USING_SENSOR_CMD
  202. bool "Using Sensor cmd"
  203. default y
  204. endif
  205. menu "Using WiFi"
  206. config RT_USING_WIFI
  207. bool "Using Wi-Fi framework"
  208. default n
  209. if RT_USING_WIFI
  210. config RT_WLAN_DEVICE_STA_NAME
  211. string "The WiFi device name for station"
  212. default "wlan0"
  213. config RT_WLAN_DEVICE_AP_NAME
  214. string "The WiFi device name for ap"
  215. default "wlan1"
  216. config RT_WLAN_DEFAULT_PROT
  217. string "Default transport protocol"
  218. default "lwip"
  219. config RT_WLAN_SCAN_WAIT_MS
  220. int "Set scan timeout time(ms)"
  221. default 10000
  222. config RT_WLAN_CONNECT_WAIT_MS
  223. int "Set connect timeout time(ms)"
  224. default 10000
  225. config RT_WLAN_SSID_MAX_LENGTH
  226. int "SSID name maximum length"
  227. default 32
  228. config RT_WLAN_PASSWORD_MAX_LENGTH
  229. int "Maximum password length"
  230. default 32
  231. config RT_WLAN_SCAN_SORT
  232. bool "Automatic sorting of scan results"
  233. default y
  234. config RT_WLAN_CFG_INFO_MAX
  235. int "Maximum number of WiFi information automatically saved"
  236. default 3
  237. config RT_WLAN_WORKQUEUE_THREAD_NAME
  238. string "WiFi work queue thread name"
  239. default "wlan_job"
  240. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  241. int "wifi work queue thread size"
  242. default 2048
  243. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  244. int "WiFi work queue thread priority"
  245. default 22
  246. config RT_WLAN_DEV_EVENT_NUM
  247. int "Maximum number of driver events"
  248. default 2
  249. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  250. bool "Forced use of PBUF transmission"
  251. default n
  252. menuconfig RT_WLAN_DEBUG
  253. bool "Enable WLAN Debugging Options"
  254. default n
  255. if RT_WLAN_DEBUG
  256. config RT_WLAN_CMD_DEBUG
  257. bool "Enable Debugging of wlan_cmd.c"
  258. default n
  259. config RT_WLAN_MGNT_DEBUG
  260. bool "Enable Debugging of wlan_mgnt.c"
  261. default n
  262. config RT_WLAN_DEV_DEBUG
  263. bool "Enable Debugging of wlan_dev.c"
  264. default n
  265. config RT_WLAN_PROT_DEBUG
  266. bool "Enable Debugging of wlan_prot.c"
  267. default n
  268. config RT_WLAN_CFG_DEBUG
  269. bool "Enable Debugging of wlan_cfg.c"
  270. default n
  271. config RT_WLAN_LWIP_DEBUG
  272. bool "Enable Debugging of wlan_lwip.c"
  273. default n
  274. endif
  275. endif
  276. endmenu
  277. menu "Using USB"
  278. config RT_USING_USB_HOST
  279. bool "Using USB host"
  280. default n
  281. if RT_USING_USB_HOST
  282. config RT_USBH_MSTORAGE
  283. bool "Enable Udisk Drivers"
  284. default n
  285. if RT_USBH_MSTORAGE
  286. config UDISK_MOUNTPOINT
  287. string "Udisk mount dir"
  288. default "/"
  289. endif
  290. endif
  291. config RT_USING_USB_DEVICE
  292. bool "Using USB device"
  293. default n
  294. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  295. config RT_USBD_THREAD_STACK_SZ
  296. int "usb thread stack size"
  297. default 4096
  298. endif
  299. if RT_USING_USB_DEVICE
  300. config USB_VENDOR_ID
  301. hex "USB Vendor ID"
  302. default 0x0FFE
  303. config USB_PRODUCT_ID
  304. hex "USB Product ID"
  305. default 0x0001
  306. config RT_USB_DEVICE_COMPOSITE
  307. bool "Enable composite device"
  308. default n
  309. choice
  310. prompt "Device type"
  311. default _RT_USB_DEVICE_NONE
  312. depends on !RT_USB_DEVICE_COMPOSITE
  313. config _RT_USB_DEVICE_NONE
  314. bool "Using custom class by register interface"
  315. select RT_USB_DEVICE_NONE
  316. config _RT_USB_DEVICE_CDC
  317. bool "Enable to use device as CDC device"
  318. select RT_USB_DEVICE_CDC
  319. config _RT_USB_DEVICE_MSTORAGE
  320. bool "Enable to use device as Mass Storage device"
  321. select RT_USB_DEVICE_MSTORAGE
  322. config _RT_USB_DEVICE_HID
  323. bool "Enable to use device as HID device"
  324. select RT_USB_DEVICE_HID
  325. config _RT_USB_DEVICE_RNDIS
  326. bool "Enable to use device as rndis device"
  327. select RT_USB_DEVICE_RNDIS
  328. depends on RT_USING_LWIP
  329. config _RT_USB_DEVICE_ECM
  330. bool "Enable to use device as ecm device"
  331. select RT_USB_DEVICE_ECM
  332. depends on RT_USING_LWIP
  333. config _RT_USB_DEVICE_WINUSB
  334. bool "Enable to use device as winusb device"
  335. select RT_USB_DEVICE_WINUSB
  336. endchoice
  337. if RT_USB_DEVICE_COMPOSITE
  338. config RT_USB_DEVICE_CDC
  339. bool "Enable to use device as CDC device"
  340. default n
  341. config RT_USB_DEVICE_NONE
  342. bool
  343. default y
  344. config RT_USB_DEVICE_MSTORAGE
  345. bool "Enable to use device as Mass Storage device"
  346. default n
  347. config RT_USB_DEVICE_HID
  348. bool "Enable to use device as HID device"
  349. default n
  350. config RT_USB_DEVICE_RNDIS
  351. bool "Enable to use device as rndis device"
  352. default n
  353. depends on RT_USING_LWIP
  354. config RT_USB_DEVICE_ECM
  355. bool "Enable to use device as ecm device"
  356. default n
  357. depends on RT_USING_LWIP
  358. config RT_USB_DEVICE_WINUSB
  359. bool "Enable to use device as winusb device"
  360. default n
  361. endif
  362. if RT_USB_DEVICE_CDC
  363. config RT_VCOM_TASK_STK_SIZE
  364. int "virtual com thread stack size"
  365. default 512
  366. config RT_VCOM_TX_USE_DMA
  367. bool "Enable to use dma for vcom tx"
  368. default n
  369. config RT_VCOM_SERNO
  370. string "serial number of virtual com"
  371. default "32021919830108"
  372. config RT_VCOM_SER_LEN
  373. int "serial number length of virtual com"
  374. default 14
  375. config RT_VCOM_TX_TIMEOUT
  376. int "tx timeout(ticks) of virtual com"
  377. default 1000
  378. endif
  379. if RT_USB_DEVICE_WINUSB
  380. config RT_WINUSB_GUID
  381. string "Guid for winusb"
  382. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  383. endif
  384. if RT_USB_DEVICE_MSTORAGE
  385. config RT_USB_MSTORAGE_DISK_NAME
  386. string "msc class disk name"
  387. default "flash0"
  388. endif
  389. if RT_USB_DEVICE_HID
  390. config RT_USB_DEVICE_HID_KEYBOARD
  391. bool "Use to HID device as Keyboard"
  392. default n
  393. if RT_USB_DEVICE_HID_KEYBOARD
  394. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  395. int "Number of Keyboard(max 3)"
  396. default 1
  397. range 1 3
  398. endif
  399. config RT_USB_DEVICE_HID_MOUSE
  400. bool "Use to HID device as Mouse"
  401. default n
  402. config RT_USB_DEVICE_HID_GENERAL
  403. bool "Use to HID device as General HID device"
  404. default y
  405. if RT_USB_DEVICE_HID_GENERAL
  406. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  407. int "General HID device out report length"
  408. default 63
  409. range 0 63
  410. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  411. int "General HID device in report length"
  412. default 63
  413. range 0 63
  414. endif
  415. config RT_USB_DEVICE_HID_MEDIA
  416. bool "Use to HID device as media keyboard"
  417. default y
  418. endif
  419. endif
  420. endmenu
  421. endmenu