Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  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. config RT_USING_SENSOR
  194. bool "Using Sensor device drivers"
  195. select RT_USING_PIN
  196. default n
  197. if RT_USING_SENSOR
  198. config RT_USING_SENSOR_CMD
  199. bool "Using Sensor cmd"
  200. default y
  201. endif
  202. menu "Using WiFi"
  203. config RT_USING_WIFI
  204. bool "Using Wi-Fi framework"
  205. default n
  206. if RT_USING_WIFI
  207. config RT_WLAN_DEVICE_STA_NAME
  208. string "The WiFi device name for station"
  209. default "wlan0"
  210. config RT_WLAN_DEVICE_AP_NAME
  211. string "The WiFi device name for ap"
  212. default "wlan1"
  213. config RT_WLAN_DEFAULT_PROT
  214. string "Default transport protocol"
  215. default "lwip"
  216. config RT_WLAN_SCAN_WAIT_MS
  217. int "Set scan timeout time(ms)"
  218. default 10000
  219. config RT_WLAN_CONNECT_WAIT_MS
  220. int "Set connect timeout time(ms)"
  221. default 10000
  222. config RT_WLAN_SSID_MAX_LENGTH
  223. int "SSID name maximum length"
  224. default 32
  225. config RT_WLAN_PASSWORD_MAX_LENGTH
  226. int "Maximum password length"
  227. default 32
  228. config RT_WLAN_SCAN_SORT
  229. bool "Automatic sorting of scan results"
  230. default y
  231. config RT_WLAN_CFG_INFO_MAX
  232. int "Maximum number of WiFi information automatically saved"
  233. default 3
  234. config RT_WLAN_WORKQUEUE_THREAD_NAME
  235. string "WiFi work queue thread name"
  236. default "wlan_job"
  237. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  238. int "wifi work queue thread size"
  239. default 2048
  240. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  241. int "WiFi work queue thread priority"
  242. default 22
  243. config RT_WLAN_DEV_EVENT_NUM
  244. int "Maximum number of driver events"
  245. default 2
  246. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  247. bool "Forced use of PBUF transmission"
  248. default n
  249. menuconfig RT_WLAN_DEBUG
  250. bool "Enable WLAN Debugging Options"
  251. default n
  252. if RT_WLAN_DEBUG
  253. config RT_WLAN_CMD_DEBUG
  254. bool "Enable Debugging of wlan_cmd.c"
  255. default n
  256. config RT_WLAN_MGNT_DEBUG
  257. bool "Enable Debugging of wlan_mgnt.c"
  258. default n
  259. config RT_WLAN_DEV_DEBUG
  260. bool "Enable Debugging of wlan_dev.c"
  261. default n
  262. config RT_WLAN_PROT_DEBUG
  263. bool "Enable Debugging of wlan_prot.c"
  264. default n
  265. config RT_WLAN_CFG_DEBUG
  266. bool "Enable Debugging of wlan_cfg.c"
  267. default n
  268. config RT_WLAN_LWIP_DEBUG
  269. bool "Enable Debugging of wlan_lwip.c"
  270. default n
  271. endif
  272. endif
  273. endmenu
  274. menu "Using USB"
  275. config RT_USING_USB_HOST
  276. bool "Using USB host"
  277. default n
  278. if RT_USING_USB_HOST
  279. config RT_USBH_MSTORAGE
  280. bool "Enable Udisk Drivers"
  281. default n
  282. if RT_USBH_MSTORAGE
  283. config UDISK_MOUNTPOINT
  284. string "Udisk mount dir"
  285. default "/"
  286. endif
  287. endif
  288. config RT_USING_USB_DEVICE
  289. bool "Using USB device"
  290. default n
  291. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  292. config RT_USBD_THREAD_STACK_SZ
  293. int "usb thread stack size"
  294. default 4096
  295. endif
  296. if RT_USING_USB_DEVICE
  297. config USB_VENDOR_ID
  298. hex "USB Vendor ID"
  299. default 0x0FFE
  300. config USB_PRODUCT_ID
  301. hex "USB Product ID"
  302. default 0x0001
  303. config RT_USB_DEVICE_COMPOSITE
  304. bool "Enable composite device"
  305. default n
  306. choice
  307. prompt "Device type"
  308. default _RT_USB_DEVICE_NONE
  309. depends on !RT_USB_DEVICE_COMPOSITE
  310. config _RT_USB_DEVICE_NONE
  311. bool "Using custom class by register interface"
  312. select RT_USB_DEVICE_NONE
  313. config _RT_USB_DEVICE_CDC
  314. bool "Enable to use device as CDC device"
  315. select RT_USB_DEVICE_CDC
  316. config _RT_USB_DEVICE_MSTORAGE
  317. bool "Enable to use device as Mass Storage device"
  318. select RT_USB_DEVICE_MSTORAGE
  319. config _RT_USB_DEVICE_HID
  320. bool "Enable to use device as HID device"
  321. select RT_USB_DEVICE_HID
  322. config _RT_USB_DEVICE_RNDIS
  323. bool "Enable to use device as rndis device"
  324. select RT_USB_DEVICE_RNDIS
  325. depends on RT_USING_LWIP
  326. config _RT_USB_DEVICE_ECM
  327. bool "Enable to use device as ecm device"
  328. select RT_USB_DEVICE_ECM
  329. depends on RT_USING_LWIP
  330. config _RT_USB_DEVICE_WINUSB
  331. bool "Enable to use device as winusb device"
  332. select RT_USB_DEVICE_WINUSB
  333. endchoice
  334. if RT_USB_DEVICE_COMPOSITE
  335. config RT_USB_DEVICE_CDC
  336. bool "Enable to use device as CDC device"
  337. default n
  338. config RT_USB_DEVICE_NONE
  339. bool
  340. default y
  341. config RT_USB_DEVICE_MSTORAGE
  342. bool "Enable to use device as Mass Storage device"
  343. default n
  344. config RT_USB_DEVICE_HID
  345. bool "Enable to use device as HID device"
  346. default n
  347. config RT_USB_DEVICE_RNDIS
  348. bool "Enable to use device as rndis device"
  349. default n
  350. depends on RT_USING_LWIP
  351. config RT_USB_DEVICE_ECM
  352. bool "Enable to use device as ecm device"
  353. default n
  354. depends on RT_USING_LWIP
  355. config RT_USB_DEVICE_WINUSB
  356. bool "Enable to use device as winusb device"
  357. default n
  358. endif
  359. if RT_USB_DEVICE_CDC
  360. config RT_VCOM_TASK_STK_SIZE
  361. int "virtual com thread stack size"
  362. default 512
  363. config RT_VCOM_TX_USE_DMA
  364. bool "Enable to use dma for vcom tx"
  365. default n
  366. config RT_VCOM_SERNO
  367. string "serial number of virtual com"
  368. default "32021919830108"
  369. config RT_VCOM_SER_LEN
  370. int "serial number length of virtual com"
  371. default 14
  372. config RT_VCOM_TX_TIMEOUT
  373. int "tx timeout(ticks) of virtual com"
  374. default 1000
  375. endif
  376. if RT_USB_DEVICE_WINUSB
  377. config RT_WINUSB_GUID
  378. string "Guid for winusb"
  379. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  380. endif
  381. if RT_USB_DEVICE_MSTORAGE
  382. config RT_USB_MSTORAGE_DISK_NAME
  383. string "msc class disk name"
  384. default "flash0"
  385. endif
  386. if RT_USB_DEVICE_HID
  387. config RT_USB_DEVICE_HID_KEYBOARD
  388. bool "Use to HID device as Keyboard"
  389. default n
  390. if RT_USB_DEVICE_HID_KEYBOARD
  391. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  392. int "Number of Keyboard(max 3)"
  393. default 1
  394. range 1 3
  395. endif
  396. config RT_USB_DEVICE_HID_MOUSE
  397. bool "Use to HID device as Mouse"
  398. default n
  399. config RT_USB_DEVICE_HID_GENERAL
  400. bool "Use to HID device as General HID device"
  401. default y
  402. if RT_USB_DEVICE_HID_GENERAL
  403. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  404. int "General HID device out report length"
  405. default 63
  406. range 0 63
  407. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  408. int "General HID device in report length"
  409. default 63
  410. range 0 63
  411. endif
  412. config RT_USB_DEVICE_HID_MEDIA
  413. bool "Use to HID device as media keyboard"
  414. default y
  415. endif
  416. endif
  417. endmenu
  418. endmenu