Kconfig 14 KB

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