Kconfig 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  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 2048
  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 n
  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_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. help
  161. An using JEDEC's SFDP standard serial (SPI) flash universal driver library
  162. if RT_USING_SFUD
  163. config RT_SFUD_USING_SFDP
  164. bool "Using auto probe flash JEDEC SFDP parameter"
  165. default y
  166. config RT_SFUD_USING_FLASH_INFO_TABLE
  167. bool "Using defined supported flash chip information table"
  168. default y
  169. config RT_SFUD_USING_QSPI
  170. bool "Using QSPI mode support"
  171. select RT_USING_QSPI
  172. default n
  173. config RT_DEBUG_SFUD
  174. bool "Show more SFUD debug information"
  175. default n
  176. endif
  177. config RT_USING_ENC28J60
  178. bool "Using ENC28J60 SPI Ethernet network interface"
  179. select RT_USING_LWIP
  180. default n
  181. config RT_USING_SPI_WIFI
  182. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  183. select RT_USING_LWIP
  184. default n
  185. endif
  186. config RT_USING_WDT
  187. bool "Using Watch Dog device drivers"
  188. default n
  189. config RT_USING_AUDIO
  190. bool "Using Audio device drivers"
  191. default n
  192. config RT_USING_SENSOR
  193. bool "Using Sensor device drivers"
  194. select RT_USING_PIN
  195. default n
  196. if RT_USING_SENSOR
  197. config RT_USING_SENSOR_CMD
  198. bool "Using Sensor cmd"
  199. default y
  200. endif
  201. config RT_USING_TOUCH
  202. bool "Using Touch device drivers"
  203. default n
  204. menu "Using Hardware Crypto drivers"
  205. config RT_USING_HWCRYPTO
  206. bool "Using Hardware Crypto"
  207. default n
  208. if RT_USING_HWCRYPTO
  209. config RT_HWCRYPTO_DEFAULT_NAME
  210. string "Hardware crypto device name"
  211. default "hwcryto"
  212. config RT_HWCRYPTO_IV_MAX_SIZE
  213. int "IV max size"
  214. default "16"
  215. config RT_HWCRYPTO_KEYBIT_MAX_SIZE
  216. int "Key max bit length"
  217. default 256
  218. config RT_HWCRYPTO_USING_GCM
  219. bool "Using Hardware GCM"
  220. default n
  221. config RT_HWCRYPTO_USING_AES
  222. bool "Using Hardware AES"
  223. default n
  224. if RT_HWCRYPTO_USING_AES
  225. config RT_HWCRYPTO_USING_AES_ECB
  226. bool "Using Hardware AES ECB mode"
  227. default y
  228. config RT_HWCRYPTO_USING_AES_CBC
  229. bool "Using Hardware AES CBC mode"
  230. default n
  231. config RT_HWCRYPTO_USING_AES_CFB
  232. bool "Using Hardware AES CFB mode"
  233. default n
  234. config RT_HWCRYPTO_USING_AES_CTR
  235. bool "Using Hardware AES CTR mode"
  236. default n
  237. config RT_HWCRYPTO_USING_AES_OFB
  238. bool "Using Hardware AES OFB mode"
  239. default n
  240. endif
  241. config RT_HWCRYPTO_USING_DES
  242. bool "Using Hardware DES"
  243. default n
  244. if RT_HWCRYPTO_USING_DES
  245. config RT_HWCRYPTO_USING_DES_ECB
  246. bool "Using Hardware DES ECB mode"
  247. default y
  248. config RT_HWCRYPTO_USING_DES_CBC
  249. bool "Using Hardware DES CBC mode"
  250. default n
  251. endif
  252. config RT_HWCRYPTO_USING_3DES
  253. bool "Using Hardware 3DES"
  254. default n
  255. if RT_HWCRYPTO_USING_3DES
  256. config RT_HWCRYPTO_USING_3DES_ECB
  257. bool "Using Hardware 3DES ECB mode"
  258. default y
  259. config RT_HWCRYPTO_USING_3DES_CBC
  260. bool "Using Hardware 3DES CBC mode"
  261. default n
  262. endif
  263. config RT_HWCRYPTO_USING_RC4
  264. bool "Using Hardware RC4"
  265. default n
  266. config RT_HWCRYPTO_USING_MD5
  267. bool "Using Hardware MD5"
  268. default n
  269. config RT_HWCRYPTO_USING_SHA1
  270. bool "Using Hardware SHA1"
  271. default n
  272. config RT_HWCRYPTO_USING_SHA2
  273. bool "Using Hardware SHA2"
  274. default n
  275. if RT_HWCRYPTO_USING_SHA2
  276. config RT_HWCRYPTO_USING_SHA2_224
  277. bool "Using Hardware SHA2_224 mode"
  278. default n
  279. config RT_HWCRYPTO_USING_SHA2_256
  280. bool "Using Hardware SHA2_256 mode"
  281. default y
  282. config RT_HWCRYPTO_USING_SHA2_384
  283. bool "Using Hardware SHA2_384 mode"
  284. default n
  285. config RT_HWCRYPTO_USING_SHA2_512
  286. bool "Using Hardware SHA2_512 mode"
  287. default n
  288. endif
  289. config RT_HWCRYPTO_USING_RNG
  290. bool "Using Hardware RNG"
  291. default n
  292. config RT_HWCRYPTO_USING_CRC
  293. bool "Using Hardware CRC"
  294. default n
  295. if RT_HWCRYPTO_USING_CRC
  296. config RT_HWCRYPTO_USING_CRC_07
  297. bool "Using Hardware CRC-8 0x07 polynomial"
  298. default n
  299. config RT_HWCRYPTO_USING_CRC_8005
  300. bool "Using Hardware CRC-16 0x8005 polynomial"
  301. default n
  302. config RT_HWCRYPTO_USING_CRC_1021
  303. bool "Using Hardware CRC-16 0x1021 polynomial"
  304. default n
  305. config RT_HWCRYPTO_USING_CRC_3D65
  306. bool "Using Hardware CRC-16 0x3D65 polynomial"
  307. default n
  308. config RT_HWCRYPTO_USING_CRC_04C11DB7
  309. bool "Using Hardware CRC-32 0x04C11DB7 polynomial"
  310. default n
  311. endif
  312. config RT_HWCRYPTO_USING_BIGNUM
  313. bool "Using Hardware bignum"
  314. default n
  315. if RT_HWCRYPTO_USING_BIGNUM
  316. config RT_HWCRYPTO_USING_BIGNUM_EXPTMOD
  317. bool "Using Hardware bignum expt_mod operation"
  318. default y
  319. config RT_HWCRYPTO_USING_BIGNUM_MULMOD
  320. bool "Using Hardware bignum mul_mod operation"
  321. default y
  322. config RT_HWCRYPTO_USING_BIGNUM_MUL
  323. bool "Using Hardware bignum mul operation"
  324. default n
  325. config RT_HWCRYPTO_USING_BIGNUM_ADD
  326. bool "Using Hardware bignum add operation"
  327. default n
  328. config RT_HWCRYPTO_USING_BIGNUM_SUB
  329. bool "Using Hardware bignum sub operation"
  330. default n
  331. endif
  332. endif
  333. endmenu
  334. menu "Using WiFi"
  335. config RT_USING_WIFI
  336. bool "Using Wi-Fi framework"
  337. default n
  338. if RT_USING_WIFI
  339. config RT_WLAN_DEVICE_STA_NAME
  340. string "The WiFi device name for station"
  341. default "wlan0"
  342. config RT_WLAN_DEVICE_AP_NAME
  343. string "The WiFi device name for ap"
  344. default "wlan1"
  345. config RT_WLAN_DEFAULT_PROT
  346. string "Default transport protocol"
  347. default "lwip"
  348. config RT_WLAN_SCAN_WAIT_MS
  349. int "Set scan timeout time(ms)"
  350. default 10000
  351. config RT_WLAN_CONNECT_WAIT_MS
  352. int "Set connect timeout time(ms)"
  353. default 10000
  354. config RT_WLAN_SSID_MAX_LENGTH
  355. int "SSID name maximum length"
  356. default 32
  357. config RT_WLAN_PASSWORD_MAX_LENGTH
  358. int "Maximum password length"
  359. default 32
  360. config RT_WLAN_SCAN_SORT
  361. bool "Automatic sorting of scan results"
  362. default y
  363. config RT_WLAN_CFG_INFO_MAX
  364. int "Maximum number of WiFi information automatically saved"
  365. default 3
  366. config RT_WLAN_WORKQUEUE_THREAD_NAME
  367. string "WiFi work queue thread name"
  368. default "wlan_job"
  369. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  370. int "wifi work queue thread size"
  371. default 2048
  372. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  373. int "WiFi work queue thread priority"
  374. default 22
  375. config RT_WLAN_DEV_EVENT_NUM
  376. int "Maximum number of driver events"
  377. default 2
  378. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  379. bool "Forced use of PBUF transmission"
  380. default n
  381. menuconfig RT_WLAN_DEBUG
  382. bool "Enable WLAN Debugging Options"
  383. default n
  384. if RT_WLAN_DEBUG
  385. config RT_WLAN_CMD_DEBUG
  386. bool "Enable Debugging of wlan_cmd.c"
  387. default n
  388. config RT_WLAN_MGNT_DEBUG
  389. bool "Enable Debugging of wlan_mgnt.c"
  390. default n
  391. config RT_WLAN_DEV_DEBUG
  392. bool "Enable Debugging of wlan_dev.c"
  393. default n
  394. config RT_WLAN_PROT_DEBUG
  395. bool "Enable Debugging of wlan_prot.c"
  396. default n
  397. config RT_WLAN_CFG_DEBUG
  398. bool "Enable Debugging of wlan_cfg.c"
  399. default n
  400. config RT_WLAN_LWIP_DEBUG
  401. bool "Enable Debugging of wlan_lwip.c"
  402. default n
  403. endif
  404. endif
  405. endmenu
  406. menu "Using USB"
  407. config RT_USING_USB_HOST
  408. bool "Using USB host"
  409. default n
  410. if RT_USING_USB_HOST
  411. config RT_USBH_MSTORAGE
  412. bool "Enable Udisk Drivers"
  413. default n
  414. if RT_USBH_MSTORAGE
  415. config UDISK_MOUNTPOINT
  416. string "Udisk mount dir"
  417. default "/"
  418. endif
  419. endif
  420. config RT_USING_USB_DEVICE
  421. bool "Using USB device"
  422. default n
  423. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  424. config RT_USBD_THREAD_STACK_SZ
  425. int "usb thread stack size"
  426. default 4096
  427. endif
  428. if RT_USING_USB_DEVICE
  429. config USB_VENDOR_ID
  430. hex "USB Vendor ID"
  431. default 0x0FFE
  432. config USB_PRODUCT_ID
  433. hex "USB Product ID"
  434. default 0x0001
  435. config RT_USB_DEVICE_COMPOSITE
  436. bool "Enable composite device"
  437. default n
  438. choice
  439. prompt "Device type"
  440. default _RT_USB_DEVICE_NONE
  441. depends on !RT_USB_DEVICE_COMPOSITE
  442. config _RT_USB_DEVICE_NONE
  443. bool "Using custom class by register interface"
  444. select RT_USB_DEVICE_NONE
  445. config _RT_USB_DEVICE_CDC
  446. bool "Enable to use device as CDC device"
  447. select RT_USB_DEVICE_CDC
  448. config _RT_USB_DEVICE_MSTORAGE
  449. bool "Enable to use device as Mass Storage device"
  450. select RT_USB_DEVICE_MSTORAGE
  451. config _RT_USB_DEVICE_HID
  452. bool "Enable to use device as HID device"
  453. select RT_USB_DEVICE_HID
  454. config _RT_USB_DEVICE_RNDIS
  455. bool "Enable to use device as rndis device"
  456. select RT_USB_DEVICE_RNDIS
  457. depends on RT_USING_LWIP
  458. config _RT_USB_DEVICE_ECM
  459. bool "Enable to use device as ecm device"
  460. select RT_USB_DEVICE_ECM
  461. depends on RT_USING_LWIP
  462. config _RT_USB_DEVICE_WINUSB
  463. bool "Enable to use device as winusb device"
  464. select RT_USB_DEVICE_WINUSB
  465. endchoice
  466. if RT_USB_DEVICE_COMPOSITE
  467. config RT_USB_DEVICE_CDC
  468. bool "Enable to use device as CDC device"
  469. default n
  470. config RT_USB_DEVICE_NONE
  471. bool
  472. default y
  473. config RT_USB_DEVICE_MSTORAGE
  474. bool "Enable to use device as Mass Storage device"
  475. default n
  476. config RT_USB_DEVICE_HID
  477. bool "Enable to use device as HID device"
  478. default n
  479. config RT_USB_DEVICE_RNDIS
  480. bool "Enable to use device as rndis device"
  481. default n
  482. depends on RT_USING_LWIP
  483. config RT_USB_DEVICE_ECM
  484. bool "Enable to use device as ecm device"
  485. default n
  486. depends on RT_USING_LWIP
  487. config RT_USB_DEVICE_WINUSB
  488. bool "Enable to use device as winusb device"
  489. default n
  490. endif
  491. if RT_USB_DEVICE_CDC
  492. config RT_VCOM_TASK_STK_SIZE
  493. int "virtual com thread stack size"
  494. default 512
  495. config RT_VCOM_TX_USE_DMA
  496. bool "Enable to use dma for vcom tx"
  497. default n
  498. config RT_VCOM_SERNO
  499. string "serial number of virtual com"
  500. default "32021919830108"
  501. config RT_VCOM_SER_LEN
  502. int "serial number length of virtual com"
  503. default 14
  504. config RT_VCOM_TX_TIMEOUT
  505. int "tx timeout(ticks) of virtual com"
  506. default 1000
  507. endif
  508. if RT_USB_DEVICE_WINUSB
  509. config RT_WINUSB_GUID
  510. string "Guid for winusb"
  511. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  512. endif
  513. if RT_USB_DEVICE_MSTORAGE
  514. config RT_USB_MSTORAGE_DISK_NAME
  515. string "msc class disk name"
  516. default "flash0"
  517. endif
  518. if RT_USB_DEVICE_RNDIS
  519. config RNDIS_DELAY_LINK_UP
  520. bool "Delay linkup media connection"
  521. select RT_USING_TIMER_SOFT
  522. default n
  523. endif
  524. if RT_USB_DEVICE_HID
  525. config RT_USB_DEVICE_HID_KEYBOARD
  526. bool "Use to HID device as Keyboard"
  527. default n
  528. if RT_USB_DEVICE_HID_KEYBOARD
  529. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  530. int "Number of Keyboard(max 3)"
  531. default 1
  532. range 1 3
  533. endif
  534. config RT_USB_DEVICE_HID_MOUSE
  535. bool "Use to HID device as Mouse"
  536. default n
  537. config RT_USB_DEVICE_HID_GENERAL
  538. bool "Use to HID device as General HID device"
  539. default y
  540. if RT_USB_DEVICE_HID_GENERAL
  541. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  542. int "General HID device out report length"
  543. default 63
  544. range 0 63
  545. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  546. int "General HID device in report length"
  547. default 63
  548. range 0 63
  549. endif
  550. config RT_USB_DEVICE_HID_MEDIA
  551. bool "Use to HID device as media keyboard"
  552. default y
  553. endif
  554. endif
  555. endmenu
  556. endmenu